I'm having some problems specifying the values for the X-Axis correctly - please see the images from the below:
http://alanhay.ndo.co.uk/images/
The X-Axis should be a sequence like:
4,6,8,10,12,14,16,18,20 - drawn correctly
5,7,9,11,13,15,17,19,21 - drawn as in incorrect.jpeg
However in some cases it will not draw correctly.
Currently I am trying to use the methods:
setyLowerBound()
setUpperBound()
setTickUnit()
Using values 5,21 gives incorrect_2.jpg
Using values 5,21,2 gives incorrect_1.jpg
DomainAxis Problem
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
The tick marks and labels always fall on multiples of the tick size, so it won't let you have just odd numbers. You can subclass the NumberAxis class and override the refreshTicks() method to return any tick values that you want, though.
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

