Hi,
Just started using JFreeChart.
How to add a line to a ScatterPlot?
I have tried generating the image of the ScatterPlot and using it as background to a XYLineChart.
Maybe I need to follow what ChartFactory is doing and customise.
Thanks for any pointers,
Andy
Adding to a Plot
-
- JFreeChart Project Leader
- Posts: 11734
- Joined: Fri Mar 14, 2003 10:29 am
- antibot: No, of course not.
- Contact:
If you have the JFreeChart Developer Guide, take a look at RegressionDemo1.java, which adds a regression line to a set of points.
Otherwise, the approach is to add two datasets to the plot, and also two renderers (one an XYLineAndShapeRenderer that displays only shapes, the other an XYLineAndShapeRenderer that displays only lines).
Otherwise, the approach is to add two datasets to the plot, and also two renderers (one an XYLineAndShapeRenderer that displays only shapes, the other an XYLineAndShapeRenderer that displays only lines).
David Gilbert
JFreeChart Project Leader
Read my blog
Support JFree via the Github sponsorship program
JFreeChart Project Leader

