点在jfreechart中的一行 [英] Points on a line in jfreechart

查看:156
本文介绍了点在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.

附录: org.jfree.data.statistics.Regression 类提供了一些内置支持回归分析。

Addendum: The org.jfree.data.statistics.Regression class offers some built-in support for regression analysis.

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

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