If you don't mind using ggplot2
, this might work for you:
gg <- ggplot(data=dat, aes(x=tonnes, y=reorder(Country, rank)))
gg <- gg + geom_point(aes(color=Commodity))
gg <- gg + facet_wrap(~Commodity, ncol=1)
gg <- gg + labs(y="", title="Production by country")
gg <- gg + theme_bw()
gg <- gg + theme(legend.position="none")
gg <- gg + theme(panel.grid.major.x=element_blank())
gg <- gg + theme(panel.grid.minor.x=element_blank())
gg <- gg + theme(strip.background=element_blank())
gg
Or, you can get it more dotplot
-ish by:
gg <- ggplot(data=dat, aes(x=tonnes, y=reorder(Country, rank)))
gg <- gg + geom_point(aes(color=Commodity))
gg <- gg + facet_grid(Commodity~., scales="free", space="free")
gg <- gg + labs(y="", title="Production by country")
gg <- gg + theme_bw()
gg <- gg + theme(legend.position="none")
gg <- gg + theme(panel.grid.major.x=element_blank())
gg <- gg + theme(panel.grid.minor.x=element_blank())
gg <- gg + theme(strip.background=element_blank())
gg
Or:
gg <- ggplot(data=dat, aes(x=tonnes, y=reorder(Country, rank)))
gg <- gg + geom_point(aes(color=Commodity))
gg <- gg + facet_wrap(~Commodity, ncol=1, space="free")
gg <- gg + labs(y="", title="Production by country")
gg <- gg + theme_bw()
gg <- gg + theme(legend.position="none")
gg <- gg + theme(panel.grid.major.x=element_blank())
gg <- gg + theme(panel.grid.minor.x=element_blank())
gg <- gg + theme(strip.background=element_blank())
gg