Plotting a locus in XY space using JFreeChart
Asked Answered
R

1

1

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: enter image description here

Note: I'd like to show the path as a continuous line with arrows showing the direction of motion.

Thanks.

Rant answered 6/4, 2013 at 21:38 Comment(0)
T
1

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

image

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.

image

Tonl answered 6/4, 2013 at 21:54 Comment(4)
basically need continuous line to show the motion path and arrows on the line to show the direction of motionRant
I flipped through the examples - I think all I need is somehow to affix arrows to show the path of motion. Thanks.Rant
Maybe a filled Polygon? A PIE closed sector of an Arc2d? Rotation?Tonl
mmmm no I just want to show the path of travel so the lineto stuff is good but I'd just like arrows every so often on the line to show the directionRant

© 2022 - 2024 — McMap. All rights reserved.