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.

user1172468
  • 5,306
  • 6
  • 35
  • 62

1 Answers1

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

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • basically need continuous line to show the motion path and arrows on the line to show the direction of motion – user1172468 Apr 06 '13 at 21:58
  • I flipped through the examples - I think all I need is somehow to affix arrows to show the path of motion. Thanks. – user1172468 Apr 06 '13 at 22:56
  • Maybe a filled `Polygon`? A `PIE` closed sector of an `Arc2d`? Rotation? – trashgod Apr 06 '13 at 23:00
  • 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 direction – user1172468 Apr 06 '13 at 23:53