JHeatChart: heat map charting for Java

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:

A basic heat map generated with JHeatChart


Downloads, javadoc and example code are all available on the JHeatChart project website.

Tagged with: , , , , , , , ,
Posted in Java
2 comments on “JHeatChart: heat map charting for Java
  1. Jesse says:

    Here’s another Java Heat Map library: http://www.mbeckler.org/heatMap/

    Was there a reason you didn’t just use this one?

    • Tom Castle says:

      That library is certainly very usable. My main reason for not using it is that I was primarily interested in generating png image files rather than GUI components. I also had a need for altering the gradient of the colour transitions to use logarithmic or exponential scales as well as linear, which I don’t believe is possible in that library. Please use whichever library works best for you.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">