GraPL > GraPL Desktop > Tutorials > Fuel > Raw timeseries
 

Plotting the Raw Timeseries

The first law of good analytical graphics is “just show the data” which is what we should do here. A simple running plot will get us started – begin with the Blank template and drag over a Linechart icon from the Chart elements tab. Clearly we would like to see the MPG on the vertical scale and the Odometer reading horizontally, which very quickly shows up a small problem:


Our very first MPG value was calculated as zero, because we had no prior data to use to estimate this figure. We need this row in the data sheet, but as far as the chart goes, it is a dud value and should be ignored. In this case, the problem is fairly easy to solve by telling GraPL to regard zero as ‘missing data’ which will ensure it is skipped over everywhere it appears. Drag in a ‘Missing value’ item from the Properties tab and set its value as 0 to see a much more sensible chart:

As you can see, this type of data tends to bounce up and down as we never quite manage to fill the tank to the same level each time. Cumulatively, the errors will tend to cancel, which suggests that a Moving Average would be a good technique to use. Another possibility is a simple weighted smooth (the GraPL ‘Trend’ style is the simplest option to try) just to make the patterns in the data a little clearer:

You can add a ‘Flexibility’ property here if you want to play with making the curve more or less sensitive to the spikes in the data – however the default value is quite good, and it does suggest there is a regular cycle hidden in the data. Now let’s look at a moving average to see a more scientific view.


Continue to: Averages and Smooths


© Copyright Causeway Graphical Systems Ltd 2000-2007
Telephone: +44 (0)1439 788413