In a famous plot, Charles Minard visualised the losses of the French Army in the Russian campaign of Napoleon:

enter image description here

(another nice example is this xkcd plot)

Is there a canonical name for this type of visualisation? I'm actually looking for an R package to create such plots, but I don't even know how to look for it.


As I could not find a good package in R do do this type of plots, I have created my own, called "riverplot" -- you can download it from CRAN. Here is a simplified version of the above diagram:

enter image description here

And an example of what other diagrams can be created with the package:

enter image description here


3 Answers 3


It is a map, and so cartographers would likely refer to it as a thematic map (as opposed to a topographical map). The fact that many statistical diagrams have unique names (e.g. a bar chart, a scatterplot, a dotplot) as opposed to just describing their contents can sometime be a hindrance. Both because not everything is named (as is the case here) and the same name can refer to different types of displays (dotplot is a good example).

In the Grammar of Graphics Wilkinson describes a graph as geometric elements displayed in a particular coordinate system. Here he refers to Napoleon's March as a path element whose width represents the number of troops. In this example the path is drawn in a Cartesian coordinate system whose points represent actual locations in Europe. The points are connected as a representation of the journey Napoleon and his army took, although it likely does not exactly trace the journey (nor does the wider element at the start mean the army took up more space on the road!)

There are many different software programs that have the capabilities to to draw this type of diagram. Michael Friendly has a whole page of examples. Below is a slightly amended example using the ggplot2 package in R (as you requested an example in R), although it could certainly be replicated in base graphics.

mydir <- "your directory here"

troops     <- read.table("troops.txt", header=T) 
              #data is from Friendly link
cities     <- read.table("cities.txt", header=T) 
temps      <- read.table("temps.txt", header=T)
temps$date <- as.Date(strptime(temps$date,"%d%b%Y"))

xlim <- scale_x_continuous(limits = c(24, 39))
p <- ggplot(cities, aes(x = long, y = lat)) + 
               aes(size = survivors, colour = direction, group = group), 
               data=troops, linejoin = "round", lineend = "round"
               ) + 
     geom_point() + 
     geom_text(aes(label = city), hjust=0, vjust=1, size=4) + 
     scale_size(range = c(1, 10)) + 
     scale_colour_manual(values = c("grey50","red")) +
     xlim + coord_fixed(ratio = 1)
ggsave(file = "march.png", width=16, height=4)

enter image description here

Here are a few of the things that make this different than the original:

  • I did not display the temperature graph at the bottom of the plot. In ggplot2 you can make a separate graph, you cannot draw lines across the separate graph windows though.
  • Minard's original graph shows the path diminishing in steps between cities. This graph does not interpolate the losses like that, and shows abrupt changes from city to city. (Troop sizes are taken from a diary of a physician who traveled with the army I believe)
  • This graph shows the exact location of the contemporary cities, Minard tended to bend space slightly to make the graph nicer. A more blatant example is the location of England in Minards map of migration flows.
  • $\begingroup$ I accept this answer, because this is the precise, and exhaustive, answer to my question. It is my fault that my question was less then perfect and that I actually meant something else; what I really meant were the Sankey diagrams :-) $\endgroup$
    – January
    Feb 19, 2014 at 19:21
  • $\begingroup$ You're on the right lines (excuse the pun) with "It is a map, and so cartographers would likely refer to it as a thematic map (as opposed to a topographical map)." However, there are many kinds of thematic map. This kind is usually referred to as a flow line map. Examples at google.ca/… $\endgroup$
    – Martin F
    Feb 20, 2014 at 22:55
  • 1
    $\begingroup$ Here is a link to Hadley Wickham's paper on A Layered Grammar of Graphics that references the Mindard's plot and gives ggplot2 code to reproduce. vita.had.co.nz/papers/layered-grammar.pdf $\endgroup$
    – D L Dahly
    Dec 17, 2014 at 12:27

I have found it. What I was looking for is called a "Sankey diagram". Although there seems to be a tutorial on generating these graphs using rCharts, apparently there is no R-only package for this type of graphs yet on CRAN.

  • 1
    $\begingroup$ Hey, a chance for you to publish a CRAN package! :-) $\endgroup$ Feb 19, 2014 at 15:57
  • 1
    $\begingroup$ Definitely. I already started dabbling with the code. I will, however, use this opportunity to recommend my package pca3d :-) cran.r-project.org/web/packages/pca3d/index.html $\endgroup$
    – January
    Feb 19, 2014 at 19:23
  • $\begingroup$ Here you go-- I have created the package (see Edit in the question). $\endgroup$
    – January
    Feb 27, 2014 at 14:39
  • 6
    $\begingroup$ So, January released a package in February. I'll ... March over to get it. :-) $\endgroup$ Feb 27, 2014 at 15:46

I don't think so. It includes so many elements I doubt it lends itself a single canonical name. That said, you could look for ribbon plot, parallel coordinates plot, and (thanks to the comment above from user603) flow map (and searching for flow maps certainly seems the way to proceed). A web search for "replicate Charles Minard's visualization" led to these two possibly useful links. 1, 2.


Not the answer you're looking for? Browse other questions tagged or ask your own question.