# NOT RUN {
data(Minard.troops); data(Minard.cities)
# }
# NOT RUN {
require(ggplot2)
plot_troops <- ggplot(Minard.troops, aes(long, lat)) +
geom_path(aes(size = survivors, colour = direction, group = group))
plot_both <- plot_troops +
geom_text(aes(label = city), size = 4, data = Minard.cities)
plot_polished <- plot_both +
scale_size(to = c(1, 12),
breaks = c(1, 2, 3) * 10^5, labels = comma(c(1, 2, 3) * 10^5)) +
scale_colour_manual(values = c("grey50","red")) +
xlab(NULL) +
ylab(NULL)
# re-scale the plot window to an aspect ratio of ~ 4 x 1
windows(width=12, height=3)
plot_polished
## TODO: add the plot of temperature below
# }
Run the code above in your browser using DataLab