Basic Interface Elements
The end-product of this tutorial is a simple summary graphic, taken from the Guardian newspaper, showing the growth in mobile phone usage over the last 2 years.
It is a good example to start with, as there is very little data to enter, so you can spend most of your time learning your way around the various property settings to get the headings and barchart colours to look right.
Exploring the interface
We should start by investigating the various parts of the GraPL interface. Hit the ‘New’ button to make a completely empty GraPL project, and then hit the ‘Save’ button (or choose File,Save from the menu) to give it a name and keep it filed for later.
As you can see, I called my saved file ‘Mobiles’ and saved it in my GraPL data folder. Now look around the main form, and click on the various tabs to see what they might do. Basically, you type stuff in on the left and you see the results in the small preview at the lower right – as you would expect, this starts off completely blank as we haven’t drawn anything yet. Let’s start by looking at each of the left-hand tabs in turn.
This is where you build up the settings for the chart you are working on. The items in Bold type are like the ‘verbs’ in the GraPL language – they make things happen! In this case we have only a New Frame which just sets up the outline of the chart area, and adds standard elements like headings and footnotes.
If you want to test this out, type something like Hello,world into the space opposite the Heading property and press Enter to see the effect.
Probably the thumbnail will show this clearly enough, but to make it bigger, unlatch the ‘Show components’ button on the toolbar (press F12 to toggle this option) which will give the entire right-hand half of the screen to the preview:
You will have noticed that the Heading property has a small ‘+’ to its left – this is because there are some extra options that you can set for headings, such as placement, colour and typeface. If you like, you can open up the tree and spend a few minutes playing with the options, as this is one of the things we will need to change to get our ‘Mobiles’ chart to look right.
When you click on the second of the left-hand tabs you will see an empty data-sheet with two columns and three rows. The drop-down at the top shows ‘Sheet1’ and if you select it you will see that there is only one sheet available. For this project, you will only need the one data-sheet, so let’s rename it to be something sensible. The columns will hold data for 1999 and 1998 subscribers, each row being one of 4 major suppliers.
To set up the sheet how we want it, use the right-mouse menu (selecting ‘Properties’) or click on the sheet and press Alt+Enter.
This will give you a properties page, looking very like:
Change the sheet name, spin the columns up to 3 and the rows to 4, and set up the column names and column types to look like this:
You will find that you can choose the column types from a limited list of possibilities, in this case we need one text column for the supplier name and two numeric columns for the data. If you know what the units of the data are, you can also give this information here. On pressing OK you will find that your data-sheet now has the correct name and that the columns are headed correctly, ready for you to enter the numbers. Because there is so little data to enter here, you can simply type in the values to get the sheet shown below:
Notice that there is a solid line drawn after the first column – this is what the ‘Fixed columns’ setting in the sheet properties sets up for you. If you have a very wide sheet, this will ensure that one or more of the left-most columns stay visible as you scroll across.
When entering the data, there is no need to double-click the cell or press F2 to edit the values – just cursor to the cell and start typing to replace the current cell contents. If you make a small typing mistake and want to edit the text in a cell, cursor to it and press F2 (or double-click it) to open it for editing.
Now that we have some numbers, it would be good to try a simple plot, but first let’s briefly visit the remaining tab on the left-hand side of the screen.
This tab will get a serious workout in our third tutorial, which shows you how to take a table of input data and do a variety of simple arithmetic on the columns to generate new columns, or entire new data-sheets. For example you can add columns together, work out the rate of change in a column by taking the difference between successive values, summarise data into groups, or apply a variety of smoothing rules like moving averages.
For this tutorial, we have our data in the form we need, so you can ignore calculations for now. Let’s go on to construct a simple barchart showing the rise and rise of the mobile phone!
Continue to: A Simple Barchart
|