I have an XYPlot displaying points and lines.
The points are created randomly so the chart will be different every time I launch the application.
With my current example, I've got the following TickUnit :
- Y axis : 1 2 3 4 5 6 ...
- X axis : 0.2 0.4 0.6 0.8 ...
I'm trying to get current TickUnit but it returns "size=1" for both axis :
NumberAxis range1 = (NumberAxis)plot.getRangeAxis();
NumberTickUnit ntu1 = range1.getTickUnit();
System.out.println(""+ range1.getTickUnit().toString());
NumberAxis range2 = (NumberAxis)plot.getDomainAxis();
NumberTickUnit ntu2 = range2.getTickUnit();
System.out.println(""+ range2.getTickUnit().toString());
Any idea how I can get 0.2 for X axis ?
I'd like to get these values so that I can add an annotation over a line at an appropriated distance.