inkblot: an alternative to stacked bar graphs

February 25, 2010

(This article was first published on factbased, and kindly contributed to R-bloggers)

Sometimes it is not easy to get useful information from a stacked bar chart, see for instance
this blogpost at Support Analytics.

So-called inkblot charts, as discussed at Kaiser Fung’s
Junk Charts, allow the reader to focus on the evolution
of a time series.

Now how to make this kind of charts with R? I asked on
StackOverflow. The given answers led to an implementation
of an inkblot function. It is delivered with the wzd package on r-forge. Here is an example which visualizes the income per capita from
various countries, as reported by gapminder:

> #install.packages("wzd")
> library(wzd)
> data(gmIncomePerCapita)
> selection <- window(gmIncomePerCapita,
+ start=as.Date("1900-01-01"),
+ end=as.Date("2008-01-01")
+ )[,c("Germany", "India", "Japan", "Norway", "United States", "Venezuela")]
> inkblot(selection, min.height=1300)

To leave a comment for the author, please follow the link and comment on their blog: factbased. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)