GraPL > GraPL Desktop > Tutorials > Playfair > Making a linegraph
 

Making a Linegraph

Now we have some data, the next stage is to make a simple line-graph. To start from a clean sheet, select the ‘Charts’ tab on the left and the ‘Templates’ on the right and drop the ‘Blank’ template on the chart window. This will show you a screen like:


where you can give your chart a name and a brief description. These notes will be used to annotate the chart if you later choose to export it as a web page. In this case, the default choice is to replace the current chart, which is correct. You will find that if you drop a template on a non-blank chart GraPL defaults to adding it as a new chart.

Now we need to add a line-chart from the ‘Chart elements’ tab on the right. Select ‘Linegraph’ and either drag it into the space at the bottom of the chart, or press Enter or double-click it (this always appends at the end of the definition). The screen will now look like:

Look carefully at the definition of ‘Linegraph’ – you will see that we are plotting a built-in data series called {data} rather than your numbers. This is what GraPL always does when you add a new chart element, as it has no idea what you really want to plot, but it is helpful to plot something. Just overtype it with the name of your series to see something more useful:

Here I have also pressed F12 to toggle the chart preview to full size. You can switch between this and the thumbnail view at any time as you work – the two-pane button on the toolbar has the same effect. Note that you can refer to your series either with its column name (‘Debt’ in this case) or with the sheet-name and column name (‘Playfair data.Debt’ in this case) and that capital letters are optional. If you have several data-sheets with similarly-named columns you will need to use the full name, but clearly there is no problem with just using the column name here as it is an unambiguous reference to the data.

This is still not quite what we wanted – GraPL has not been told what to use as the x-axis, so it has simply generated the series 1,2....,10 and plotted your y-variable against this. Fill in the ‘Versus’ property with ‘Year’ and set the ‘Style’ to have surface shading and press Enter (or hit the ‘Run’ button on the toolbar) to see the final cut at the ‘simple’ version of our Playfair plot:

At least this is now an ‘honest’ graphic. If you like, you can explore the property-tree for the chart frame to set headings, footers, and so on. Notice that if you know what you want to do (it was a reasonable guess that ‘surface’ would shade the chart) you can simply type the property details in directly. If you are unsure, just press the ‘...’ button (or hit Ctrl+Enter with the cursor in the appropriate cell) for a dialogue like this:

When you exit with OK, GraPL will set the property up for you and will automatically redraw the chart.

Now would be a good time to save your work! You might like to use File,Properties to make some notes about the project as a whole (again this is used when you print your chart or export it as a web page), then File,Save to save it on disk.


Continue to: Setting up the X-axis


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