More than once over the last couple of years, my research has required me to be able to visualise 3-dimensions of data in a way that is achieved perfectly by a heat map. The most convenient approach is if I can generate the charts on the fly during execution of my experiments. However, it seems that very few of the many many charting APIs that are out there seem to contain the facility to create heat maps (heat charts). The newer releases of JFreeChart do contain some support for heat maps, but they’re hard to get to grips with amongst the unwieldy mess that is the JFreeChart API.
My solution was to knock up a quick and dirty bit of code to draw the heat maps that I wanted. I’ve now tidied this code up and generalised it so that it can provide extremely simple solutions to most heat map requirements. You can easily grab the generated charts as an Image object or save them to disk as a png, jpg or gif. So, here it is, free to use and modify as you see fit, under an LGPL license.
Here’s an example of something it threw out with just a few lines of code:
Downloads, javadoc and example code are all available on the JHeatChart project website.