JFreeChart Scatter Plot Lines

前端 未结 2 868
感情败类
感情败类 2020-12-16 02:14

I\'m trying to create a graph with JFreeChart, however it doesn\'t get the lines right. Instead of connecting the points in the order I put them, it connects the points from

相关标签:
2条回答
  • 2020-12-16 02:37

    Try this:

     final XYSeries data = new XYSeries("data",false);
    

    Using this constructor for XYSeries disables autosort, as defined in the XYSeries API.

    Before:

    Before

    After:

    After

    0 讨论(0)
  • 2020-12-16 02:41

    Absent an sscce it's hard to say, but you might try returning DomainOrder.NONE from your implementation of XYDataset. Also, it may help to know what meaning should be given to lines connecting dots in a scatter plot.

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