CombinedDomainXYPlot issue [was parallel coordinates]
-
- Posts: 5
- Joined: Mon Aug 09, 2004 3:20 am
- Location: Maui
CombinedDomainXYPlot issue [was parallel coordinates]
Thanks for the advice on devising a parallel coordinate
plot. I am making excellent progress with this project,
using JFreeChart as the basis.
The problem I'm having is with using multiple plots inside
a CombinedDomainXYPlot object. As the image in
the URL shows, there is a lot of "whitespace" between
the individual plots. I would like to have greater control
of the layout, and make each plot as large as space
will allow, and show as little space as
possible between each plot, still allowing for the header name
that identifies the axis.
Any ideas on how to tame the combined XY plot?
Thanks,
Bob Swanson
Image:
http://www219.pair.com/swansonr/test3.jpg
plot. I am making excellent progress with this project,
using JFreeChart as the basis.
The problem I'm having is with using multiple plots inside
a CombinedDomainXYPlot object. As the image in
the URL shows, there is a lot of "whitespace" between
the individual plots. I would like to have greater control
of the layout, and make each plot as large as space
will allow, and show as little space as
possible between each plot, still allowing for the header name
that identifies the axis.
Any ideas on how to tame the combined XY plot?
Thanks,
Bob Swanson
Image:
http://www219.pair.com/swansonr/test3.jpg
-
- Posts: 5
- Joined: Mon Aug 09, 2004 3:20 am
- Location: Maui
Re: CombinedDomainXYPlot issue [was parallel coordinates]
bobswanson wrote:
The problem I'm having is with using multiple plots inside
a CombinedDomainXYPlot object. As the image in
the URL shows, there is a lot of "whitespace" between
the individual plots. I would like to have greater control
of the layout, and make each plot as large as space
will allow, and show as little space as
possible between each plot, still allowing for the header name
that identifies the axis.
Worse yet, I just tested an example with 10 panels, and there
were NO PLOTS, just the headings and a lot of whitespace.
This happened whether I made the window full-screen or
not. I guess I need to figure out another way to do this type
of plotting.
Bob Swanson
Tried that. I forced the setGap to various valuesenrico wrote:setGap() to control the gap between subplots
including zero and the setting does not seem to
make any observable difference in the layout.
What I think is happening is that space is being
allocated for the axis, but as the image shows,
I've turned off axis visibility. Also, the font
of the headings seems to change as I resize
the plot. When I try to overcome the layout issue
by making the window full-screen, the heading fonts
seem to also grow in size. (hopefully not an optical
illusion)
-
- Posts: 5
- Joined: Mon Aug 09, 2004 3:20 am
- Location: Maui
Re: CombinedDomainXYPlot issue [was parallel coordinates]
I have "solved" the problem by using GridLayout withbobswanson wrote:
The problem I'm having is with using multiple plots inside
a CombinedDomainXYPlot object. As the image in
the URL shows, there is a lot of "whitespace" between
the individual plots. I would like to have greater control
of the layout, and make each plot as large as space
will allow, and show as little space as
possible between each plot, still allowing for the header name
that identifies the axis.
each individual panel of the parallel coordinate plot
in a grid position.
While this introduces some other issues, they seem to
be doable, and there is no longer a layout problem.
See:
http://www219.pair.com/swansonr/new_parallel.jpg
Bob Swanson
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
I think the problem with your orginal approach is caused by the maximumDrawWidth in the ChartPanel class. The default value is 800 (I think), which means that when the ChartPanel is wider than 800 pixels, the chart is drawn with a width of 800 and then stretched to fit the panel. This is a way to "cap" the size of the BufferedImage that stores the chart.
You can use the setMaximumDrawWidth() method to set this value to something larger.
You can use the setMaximumDrawWidth() method to set this value to something larger.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Well, I did not try to alter that value, but insteaddavid.gilbert wrote:I think the problem with your orginal approach is caused by the maximumDrawWidth in the ChartPanel class. The default value is 800 (I think), which means that when the ChartPanel is wider than 800 pixels, the chart is drawn with a width of 800 and then stretched to fit the panel. This is a way to "cap" the size of the BufferedImage that stores the chart.
You can use the setMaximumDrawWidth() method to set this value to something larger.
eliminated the display of ALL axes for the
individual panels. Good news! Nearly all of the
whitespace disappeared. The chart is quite
useable now. Unfortunately, a small amount
of whitespace still appears at the "bottom" of
each chart panel, where the "x" axis would have
been displayed. In the screenshot referred to
below, there is a small gap on the right side
of each panel, corresponding to the description
above.
The good news: We're nearly there!
See:
http://www219.pair.com/swansonr/parallel_example.jpg
Thanks for all the advice.
Bob Swanson
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The gap at the right side of each subplot is the axis margin (5% by default). Use the setUpperMargin() method (in the ValueAxis class) to set this to 0.0.
I'm not sure about the other gap you refer to.
I'm not sure about the other gap you refer to.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader


Sorry for the confusion. It was the same gap, just rotated. Thatdavid.gilbert wrote:The gap at the right side of each subplot is the axis margin (5% by default). Use the setUpperMargin() method (in the ValueAxis class) to set this to 0.0.
I'm not sure about the other gap you refer to.
is, the area just below each individual plots' X axis
label (non visible) would be the location of the gap.
Essentially, there is some whitespace at the "bottom" of each plot,
that I cannot seem to get rid of.
I tried setting not only the UpperMargin but also
the LowerMargin to 0 and the gap did not disappear.
Thanks again for your help.
Bob Swanson
-
- Posts: 5
- Joined: Mon Aug 09, 2004 3:20 am
- Location: Maui
Case Closed
Turns out that I did not realize that the CombinedDomainXYPlot
destroys any existing reference to the domain axis in the subplots.
By specifying the custom axis when creating the combined
plot, that axis then behaves as programmed, and has no whitespace
problem.
Consider the matter closed, and parallel coordinates
implemented using JFreeChart!
Thanks again for all the help and pointers.
Bob Swanson
destroys any existing reference to the domain axis in the subplots.
By specifying the custom axis when creating the combined
plot, that axis then behaves as programmed, and has no whitespace
problem.
Consider the matter closed, and parallel coordinates
implemented using JFreeChart!
Thanks again for all the help and pointers.
Bob Swanson