Using JFreeChart Scatter Plots is there a Way to Subdivide Styles for Data Sets?

后端 未结 1 922
无人共我
无人共我 2020-11-28 16:40

I am using JFreeChart to render a scatter plot with a couple thousand data points. I control the appearance/style of each ScatterPlotDataset by attaching a suitable XYLineA

相关标签:
1条回答
  • 2020-11-28 17:30

    You might consider the approaches mentioned here. The first implements DrawingSupplier, as shown here:

    class DefaultDrawingSupplier implements DrawingSupplier…
    

    The second extends DefaultDrawingSupplier, as shown here, to achieve a similar effect.

    Paint[] paintArray = {…};
    plot.setDrawingSupplier(new DefaultDrawingSupplier(
        paintArray, …
        DefaultDrawingSupplier.DEFAULT_SHAPE_SEQUENCE));
    

    Of course, you can always override getItemPaint(), as shown here.

    0 讨论(0)
提交回复
热议问题