Plotting non-linear data chronologically

A free public discussion forum for the JFreeChart class library.

Plotting non-linear data chronologically

Postby jusepi » Sun May 21, 2006 7:02 pm

Does anyone know if JFreechart supports plotting non-linear data? I saw a similar post from a couple years ago, but no info there. If you compare data of 2 parameters like fuel flow and exhaust temperature over time, the paramater values will change in relation to each other. However, if the values go up and back down again, you end up with a line that should go up with a certain slope and then go back down at a slightly different slope (The line will fold over itself).

I tried plotting this type of data using a XYLineChart as well as a XYScatterPlot, but for some reason, it unfolds the line and forces the X values to be ordered by the X value, not the order in which the data was added. I want the line to be connected in the order in which each point was added (chronologically), but not force the X or Y values in any way.

Here's an example of the data I'm trying to plot:

Code: Select all
Time   X   Y
1   10   8
2   18   14
3   27   22
4   39   32
5   50   41
6   62   53
7   69   62
8   77   71
9   86   80
10   82   83
11   76   77
12   61   68
13   51   59
14   40   44
15   31   32
16   22   23
17   14   14


In MS Excel the graph is exactly how I expect it when using an X-Y scatter chart with connected lines. There's no special settings to get this in Excel, so I would of thought this would be the standard behavior for most charting packages... Anyone know of a solution, or at least how one might go about extending the package??? Any advice is MUCH appreciated.
jusepi
 
Posts: 16
Joined: Tue May 09, 2006 1:18 pm
Location: USA

Return to JFreeChart - General

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 6 guests