The data is fairly well behaved, and generally is in the range of 0 - 500.
My issue is that for some sets of data it does show tick marks every 50. But for others it shows ticks every 100 instead. As far as I can see there should be no issue with crowding out or anything like that, the charts with ticks every 100 have plenty of room between the ticks to have slotted in an extra tick.
I have attached two example charts generated by the same code. One that works, and one where the chart has decided to display ticks every 100 instead.
https://imgur.com/a/7SDdAFj
The code that I am applying is:
Code: Select all
NumberAxis xAxis = (NumberAxis) plot.getDomainAxis();
xAxis.setTickUnit(new NumberTickUnit(50));