In the above chart , I am using NumberTickUnit with codes:
Domaine X
Code: Select all
NumberAxis rangeAxis = (NumberAxis) plot.getDomainAxis();
rangeAxis.setRange(16, 71);
NumberTickUnit ntu = new NumberTickUnit( 4, new DecimalFormat("0"));
rangeAxis.setTickUnit( ntu );
Code: Select all
rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setRange(0, 100);
ntu = new NumberTickUnit( 10.0, new DecimalFormat("0"));
rangeAxis.setTickUnit( ntu );
Domain X : I want to plot the gridline at x's value 17, 18, 19, 21, 22, 23, and so all with the color BLUE (3 lines between 2 NumberTickUnits)
Range Y : I want to plot the gridline at y's value 2, 4, 6, 8, 12, 14, 16, 18 and so all with the color GREEN (4 lines between 2 NumberTickUnits)
I have a idea : using the marker But I think there is some option to do this
thanks a lot
best regards
BO