axis label

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Jane
Posts: 14
Joined: Wed Jun 25, 2008 7:16 pm

axis label

Post by Jane » Thu Mar 05, 2009 5:42 pm

Hello,

I made a combined range XYPlot. Everything thing looks fine except that the last x-axis label for subplot1 overlaps with the 1st x-axis label for subplot2. Is it possible for me to get rid off one label? Or is there a way to put extra spaces between the two subplots so that the labels won't overlap?

Thanks in advance.

Jane

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

Re: axis label

Post by david.gilbert » Thu Mar 05, 2009 9:43 pm

You could call setGap() in the CombinedRangeXYPlot to increase the gap between the subplots. Or (more work) subclass the axis class (NumberAxis? DateAxis?) and override the refreshTicks() method to control the ticks that are generated for the axis.

Those are workarounds though...the behaviour you see is a bug that needs to be addressed as soon as I can find time and a sensible way to deal with the issue (which also ties into another problem that people would like the option to label the actual end-points of the axis in some cases).
David Gilbert
JFreeChart Project Leader

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

Locked