Can jfree put arbitrary type plots in one chart?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
indio
Posts: 17
Joined: Thu Mar 27, 2008 4:14 pm

Can jfree put arbitrary type plots in one chart?

Post by indio » Tue May 20, 2008 12:37 pm

I need to fit 2 horizontal barchart plots right next to each other, in one chart.

The 2 charts show the percents of different entitities, so CombinedRangeCategoryPlot can do the job.

What I dont want is to have these 2 charts on top of the other, sharing the range axis. For aesthetic and presentation reasons, I want them next to each other.

Is that possible is some way?

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

Re: Can jfree put arbitrary type plots in one chart?

Post by RichardWest » Tue May 20, 2008 4:29 pm

indio wrote:For aesthetic and presentation reasons, I want them next to each other.
CombinedRange*Plots always place the subplots side-by-side.
Richard West
Design Engineer II
Advanced Micro Devices
Sunnyvale, CA

indio
Posts: 17
Joined: Thu Mar 27, 2008 4:14 pm

Post by indio » Tue May 20, 2008 7:13 pm

I think I made a mistake, I meant I am using CombinedDomain. The 2 graphs share the domain, its a percent.

So Combined range wont do. And in any case I just want 2 plots on the same chart, I don't care about combining their range/domain.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Tue May 20, 2008 10:09 pm

I can't think of an easy way to do this in JFreeChart. It is one of the weaknesses in JFreeChart that it is hard to get a nice alignment between two charts in two different chart panels (because of the layout approach that JFreeChart uses). The CombinedXXX plots use various hacks to get axis alignment, but there isn't a general CombinedPlot that doesn't involve sharing axes. It would probably make a nice addition to JFreeChart, although I suspect it would be hard to get it to work well for every combination of charts /axes that could be thrown at it.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked