Plotting a locus in XY space using JFreeChart

跟風遠走 提交于 2019-12-31 04:22:47

问题


I would like to plot the locus of a particle in two dimensional space.

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.

Thanks.


回答1:


ChartFactory.createScatterPlot(), illustrated here, might be a good starting point.

FastScatterPlot, cited here and illustrated here, may be required for larger datasets.

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.



来源:https://stackoverflow.com/questions/15856325/plotting-a-locus-in-xy-space-using-jfreechart

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!