How can JFreeChart print a scatter point directly on the x axis?

北慕城南 提交于 2019-12-13 07:16:48

问题


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!!!


回答1:


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);


来源:https://stackoverflow.com/questions/8736553/how-can-jfreechart-print-a-scatter-point-directly-on-the-x-axis

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!