Hello
I have been using JFreeChart for quite a while and would like to say it works great nice work on this people. I just have one question I am currently trying to get two plots to work at the same time. The plots should be lined so that the axis of one is same as the one above. The problem is that the yAxis labels are not aligned because one axis is ranged from 0 to 10 while the other is ranged from 0-5 becasue of the 10 the axis is shifted. Can I stop this or am I going to have to live with this.
Plot alignment
Re: Plot alignment
Hi Martin,
It is a problem that doesn't have a good solution yet.
There is one workaround available. For the CombinedXYPlot class, axes are aligned by cycling through all the subplots and estimating the width (or height) of the non-shared axes. Then the setFixedDimension(...) method in the axis class is used to set the width (or height) to the largest value. You might be able to use the setFixedDimension(...) method in your own code to force the axes to align.
Regards,
DG
It is a problem that doesn't have a good solution yet.
There is one workaround available. For the CombinedXYPlot class, axes are aligned by cycling through all the subplots and estimating the width (or height) of the non-shared axes. Then the setFixedDimension(...) method in the axis class is used to set the width (or height) to the largest value. You might be able to use the setFixedDimension(...) method in your own code to force the axes to align.
Regards,
DG