How can JFreeChart print a scatter point directly on the x axis?
-
14-04-2021 - |
Question
I try to make a scatter chart but the data point is not exactly at the (2,0) coordinate and only partly visible. The image shows the generated output from JFreeChart:
http://i.stack.imgur.com/oGpZW.png
But it should be like this (made with GIMP):
http://i.stack.imgur.com/dqrnh.jpg
Does anybody know how to do it?
thanks for any help!!!
Solution
For anybody else, here is the solution, which didn't satisfy me completely but is acceptable:
http://i.stack.imgur.com/70TbB.png
The interesting lines of code to do so were:
plot.setAxisOffset(new RectangleInsets(0, 0, 0, 0));
plot.getRangeAxis().setLowerMargin(0);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow