Array of Charts?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
tedbyers
Posts: 50
Joined: Fri Oct 12, 2007 7:05 pm

Array of Charts?

Post by tedbyers » Wed Apr 02, 2008 9:13 pm

I am plotting data in two dimensions, to get a sense of the distribution and correlation of values.

I have two benchmark series for which I get the same kind of data.

The real objective is to be able to compare the distribution of values for the object of interest against the distributions of the values for the two benchmarks.

Fortunately, the values for the benchmarks are plotted behind those for the object of interest. However, for a large region of the plot, the values for the one benchmark are hidden by those for the second benchmark. The plots I am getting right now tell me precisely what I expected to find. However, I am concerned that a "user" unfamiliar with data analysis in general, or my work in particular, may find my current plots hard to interpret. What I want to do, if possible, is to put the three XY series in their own plots in an array, where the range and domain axes are identical (to make the differences in values obvious visually). Of course, this means that the distribution of values for the object of real interest will be squished toward the bottom left corner, relative to how they'd be displayed if they WEREN'T being compared to the benchmarks, BUT THAT IS BOTH EXPECTED AND IMPORTANT.

All three distributions have their greatest number of values in the bottom left corner, and this is expected. But the distributions of both benchmarks have a great many values, in both dimensions, that are MUCH greater than the greatest values for the object of interest.

I HAD considered both the combined domain and the combined range plots, but both would have resulted in one or the other dimension being compressed much too much. What would be better would be to have all three plots with identical domain and range axes, and have the resulting plots in three out of four corners (I.e. two side by side and the third below, or above, one of these).

Can this be done? Without too much pain?

Thanks for any suggestions.

Cheers,

Ted

RichardWest
Posts: 844
Joined: Fri Oct 13, 2006 9:29 pm
Location: Sunnyvale, CA

Re: Array of Charts?

Post by RichardWest » Wed Apr 02, 2008 9:31 pm

tedbyers wrote:Can this be done? Without too much pain?
See Patch 1913751 (first referenced from forum post Combine Chart in jfreechart, but the code in the thread is not the latest). This patch may make it into the 1.0.10 release of JFreeChart, but I have not confirmed it with David. The plots will be arranged in a column similar to the CombinedDomainXYPlot. Trying to arrange them in a grid would require writing your own draw mechanism for a custom plot.

If the data has a fixed range, you could create 3 XYPlots and assign the same domain and range axes to each plot. If the range is unknown ahead of time, you will have problems with the autoranging as I somewhat discuss in the patch comments. All you would have to do to arrange these is to use a layout manager.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

tedbyers
Posts: 50
Joined: Fri Oct 12, 2007 7:05 pm

Post by tedbyers » Thu Apr 03, 2008 7:42 pm

Thank you Richard. I'll take a look. I'll lt you know if I encounter any trouble.

Cheers

Ted

Locked