JFreeChart中的图形图 [英] Graph Plot in JFreeChart

查看:74
本文介绍了JFreeChart中的图形图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在X轴上,我的数据点(其中的20个)取值介于0到0.2之间.我的X轴的范围是0到1.
在Y轴上,相应的值在0.8到0.86之间.当我在JFreeChart中使用NumberAxis绘制此图时,我会得到非常密集的图,尤其是在间隔X介于0.01到0.02之间.(所以看不到什么东西)
在这种情况下,将对数刻度用于X轴有意义吗?我应该如何在JFreeChart中调整LogAxis?

On the X axis my data points(20 of them) take values between 0 and 0.2. My X axis should have range from 0 to 1.
On the Y axis corresponding values are between 0.8 and 0.86. When I plot this graph using NumberAxis in JFreeChart I get very dense graph especially in the interval X belongs to 0.01 to 0.02.(so I can't see much)
Is it meaningful to use log scale for X axis in this case? How should I adjust LogAxis in JFreeChart here?

推荐答案

要使用

To use LogAxis, just create the axis and set it as the plot's domain:

LogAxis xAxis = new LogAxis("X");
plot.setDomainAxis(xAxis);

LogAxisDemo1,显示在 demo 是一个完整的示例. LogarithmicAxis 可能会更多视觉上吸引人的选择.

LogAxisDemo1, shown among the XY Charts in the demo, is a complete example. LogarithmicAxis may be a more visually appealing alternative.

这篇关于JFreeChart中的图形图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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