I have to plot a line chart with the range of X and Y axis is in real numbers(eg.-n to n which are float values).How can i manually set the values.And this should be the dynamic chart.Actually im getting the data from the serial port frequently.Thanks in advance.
Asked
Active
Viewed 1,299 times
1 Answers
1
Revised to reflect XY requirement.
Using jfreechart, 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.
-
Thanks for your reply.Im working with this only but how can i plot the X and Y axis values as per my requirements i.e both x and y axis values are in float(-n to n).And in the time series charts X axis is having date values,but i need it to be in float. – Mukthi Aug 31 '11 at 05:49
-
Ah, I incorrectly assumed a time domain; I've suggested an alternate approach above. – trashgod Aug 31 '11 at 10:13