使用JFreeChart在XY空间中绘制轨迹 [英] Plotting a locus in XY space using JFreeChart
问题描述
我想在二维空间中绘制粒子的轨迹.
I would like to plot the locus of a particle in two dimensional space.
我的数据是X,Y坐标的序列,我想绘制它们.
My data is a sequence of X,Y coordinates and I would like to plot these.
将感谢所有指向示例的指针,这些示例演示了如何执行此操作.
Would appreciate any pointers to examples that show how to do this.
下面是一个轨迹图示例:
An example of a locus plot can be seen below:
注意:我想将路径显示为带箭头的连续线,箭头指示运动方向.
Note: I'd like to show the path as a continuous line with arrows showing the direction of motion.
谢谢.
推荐答案
ChartFactory.createScatterPlot()
,如图所示
ChartFactory.createScatterPlot()
, illustrated here, might be a good starting point.
FastScatterPlot
,在此处引用,并在附录:查看您的修订问题,我还没有看到这样的渲染器.您可能会看 org.jfree.chart.annotations
(例如,使用GeneralPath
的XYShapeAnnotation
).这些 ArcTest
变体可以提供指导.另请参见 PointyThing
.
Addendum: Looking at your revised question, I've not seen a renderer like that. You might look at a org.jfree.chart.annotations
such as XYShapeAnnotation
using a GeneralPath
. These ArcTest
variations may offer guidance. See also PointyThing
.
这篇关于使用JFreeChart在XY空间中绘制轨迹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!