Quartile Plots with JFreeChart

I spent part of this weekend hacking together a chart renderer for JFreeChart that renders box-and-whisker datasets as quartile plots, the design Edward Tufte suggests in his book, The Visual Display of Quantitative Information. I was doing this for my paper on Ceph that I’m writing, because I was dissatisfied with the way the box-and-whisker renderer looked.

The code is here: QuartilePlotRenderer.java. I think this renderer needs a little more work, but here are some samples of what it produces. I mostly like the results of this renderer; I think the lines can cause a bit of vibration if they are too heavy and too close together, but for very small datasets, it looks pretty good. I haven’t come up with a good way to render the outliers yet, so they are simply omitted.

Here’s an example of the “dot and whisker” style. I like this one the best. It uses the least ink and makes for a striking design:

dot and whisker demo

Here is the revision that changes the line weight for the interquartile range:

line thickness sample

And here is the revision that offsets the interquartile range:

line offset sample