简体   繁体   中英

How to plot jfree line chart with real numbers in X and Y axis

我必须绘制一个折线图,其X和Y轴的范围是实数(例如-n至n是浮点值)。我该如何手动设置这些值,而这应该是动态图。经常从串行端口获取数据。

Revised to reflect XY requirement.

Using , here's a basic example of ChartFactory.createXYLineChart() that demonstrates adding and removing XYDataset s. As you want to add XY pairs individually, create the chart with an XYSeriesCollection consisting of one or more XYSeries . Here's a related example that adds data dynamically to a scatter plot.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM