
Lollipop plots
Shows the relationship between two variables, at least one of which is numeric.
Show the download of the html file and the use of Protovis. Change the graph to read President Obama.
library(portfolio)
posts <- read.csv("http://datasets.flowingdata.com/post-data.txt")
map.market(id=posts$id, area=posts$views,
group=posts$category,
color=posts$comments,
main="FlowingData Map")
One disadvantage to the stacked area graph is that it can be hard to see trends for each group because the placement of each point is affected by the points below it.
So sometimes a better way is to plot proportions as a straight time series like in the previous chapter.
# Mosaic Plot Example
library(vcd)
mosaic(HairEyeColor, shade=TRUE, legend=TRUE)