JFreeChart如何直接在x轴上打印散点? [英] How can JFreeChart print a scatter point directly on the x axis?

查看:33
本文介绍了JFreeChart如何直接在x轴上打印散点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试制作散点图,但数据点不完全位于(2,0)坐标上,并且仅部分可见.该图显示了JFreeChart生成的输出:

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

但是应该是这样(由GIMP制造)

But it should be like this (made with GIMP):

http://i.stack.imgur.com/dqrnh.jpg

有人知道怎么做吗?

感谢您的帮助!

推荐答案

对于其他人,这是解决方案,虽然不能完全满足我的要求,但可以接受:

For anybody else, here is the solution, which didn't satisfy me completely but is acceptable:

http://i.stack.imgur.com/70TbB.png

有趣的代码行是:

plot.setAxisOffset(new RectangleInsets(0, 0, 0, 0));
plot.getRangeAxis().setLowerMargin(0);

这篇关于JFreeChart如何直接在x轴上打印散点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆