本文介绍了点在jfreechart中的一行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何获取连接jfreechart图表中两个数据点的线上的所有点(x,y)?
How to get all the points (x,y) lying on the line connecting two data-points in a chart in jfreechart ?.
在图表中,当我们指向线的端点时,它会显示x& y坐标。
In a chart, as we point to the end-points of the line, it shows the x & y coordinates. Can't we get the coordinates at any point on the line (via code)?
推荐答案
由于你有两点,使用获取斜率和截距的的公式的线。一旦你有了方程,你可以随时评估它。
As you have two points, use the formulae of a linear equation to obtain the slope and intercept of the line. Once you have the equation, you can evaluate it at any point.
附录:类提供了一些内置支持回归分析。
Addendum: The org.jfree.data.statistics.Regression
class offers some built-in support for regression analysis.
这篇关于点在jfreechart中的一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!