My brother’s doing his International Baccalaureate Diploma right now and for one of his Geography assignments he had to make these graphs -cross sections of rivers- he called them geographs because… they’re for geo**graph**y and because it has fewer words, so that’s what I’ll call them here. He drew them by hand but they got smudged and I thought it would be nice if he could make them digitally, but that’s a lot of work. I then thought it would be good if there was an easy way to do this, and, having found one, I’ve decided to share it with the world so that other IB students can benefit from this too!

# What is a GeoGraph?

It’s a bunch of points on a graph that shows the depth at different points of a river the class studies.

A graph looks like this one:

And as I understand, it works like this:

- there is one graph for each transect measured at different points on the river
- the width of the transect is shown
- the width of the graph is scaled to the width of the transect
- the depth of the river is shown for different points along these transects
- the depth is measured at 5 points along the transect:
- at the start of the transect
- at the end of the transect
- halfway between the start and the end
- halfway between the midpoint and the start
- halfway between the midpoint and the end

- the depth is measured as a negative number
- because depth is negative the graph is drawn below the x-axis
- the graph is shown as an irregular polygon connecting all points on the graph
- there is a line along the bottom of the polygon connecting the first and last points
- this line is as low as the lowest point on the graph

That’s a lot of points to consider, and it’s why this graph is not easily done using the graphing functions of your spreadsheet application (for most of you that’s probably MS Excel). A lot of people might get frustrated, or resort to just drawing it in Paint or some other simple drawing program, which is *much too much work*! Don’t worry there’s a much easier way of doing it, and it’s all described below.

# What do I need to make GeoGraphs?

Well, not much.

- A way to draw them: Geogebra
- Some simple arithmetic: this tutorial
- Your time and willingness to learn

# A quick word about Geogebra

The link above takes you to the online version, however, if you’d prefer to download the program and install it on your computer you can get it from the Geogebra Homepage, but what is it? They say it better than I do so:

GeoGebra is free and multi-platform dynamic mathematics software for all levels of education that joins geometry, algebra, tables, graphing, statistics and calculus in one easy-to-use package. It has received several educational software awards in Europe and the USA.

Things I like about it are that it’s free & open source software, so it’s free to share and use as you want and it runs on Windows, Mac OS X, Ubuntu and other Linux operating systems. It’s also probably available in your native language. It’s quite easy to use if you can think for yourself and is extremely useful if you ever have to draw graphs of lines or geometry for a math assignment, and lots of other stuff too. If you’re in school I can really recommend this program to you (and no they didn’t pay me to say this, this is my opinion). **You’ll need Java installed to run Geogebra! **Moving on…

# How do I make GeoGraphs?

This is the important part so I’ve tried to make it as detailed and easy to follow as possible. I’m assuming you have Geogebra installed and have your river data at hand for when you want to test “the thing that does the graphs”, so put on your favourite playlist, pull up your chair, and let’s make some GeoGraphs!

When you open Geogebra for the first time it should look like this:

There is a menubar at the top with menus for performing lots of different actions that might not be available elsewhere, this is not important and I’m not going to talk about it because you should be familiar with menu-bars, pretty much every modern program has one and you can just click around and discover it for yourself. Below that there’s a toolbar with a row of big buttons that you click on to do things.

Usually this would be what you work with most in GeoGebra but for this task it’ll be easier for me to explain how to do things by typing stuff into the box at the bottom that nobody cares about:

Now, the aim of this exercise is not just to make a geograph but to make a ‘thing’ that makes it very easy to make them, such that all you have to do is write the numbers that you recorded earlier, out in the field, and GeoGebra will do all the calculations and draw the graph for you. To do this we’re going to make a few variables to hold your values so that GeoGebra can work with them. You should have encountered variables before in maths, they’re things that hold values; `x`

and `y`

are variables. In that input box type:

```
X=20
```

It is important to always write your variable names using *capital letters*. Using numbers in variable names is fine (eg. Y1, Y2, Y3, etc… or even Aba1x) but it is important that they start with a capital letter. In GeoGebra you refer to points (as in a coordinate or some place on the canvas) with capital letters and you refer to lines with lower case letters.

Typing that should have given you something like this:

All that’s changed is that there is now a *number object* called X with a value of 20. Traditionally in graphs, X is used along the the horizontal axis of a graph, and in this case, to represent the width of the transect (makes sense that width would go on the x-axis, right?). This will enable us to scale the graph to the width of the transect later on, which is **point 3** (above) on how geographs work. Now for **point 5** we’re going to need to make 5 of these variables, one for each point along the transect, and call them Y1…Y5. (My naming convention makes sense right?) You can give these a value of 0 if you want but so that you can see the graph forming I’ll fill mine with example data similar to what you might collect in the field, so type this:

```
Y1=0
Y2=-3
Y3=-1.5
Y4=-1
Y5=0
```

`Y1`

and `Y5`

are `0`

because they are at the river bank where the depth is zero. Also, remember **point 6**, *the numbers will be negative*. If you make a mistake you can select the name of the object and press Delete or double-click it and change it to something else. You’ll have something that looks like this:

When you’re done that’s the only part you’ll need to change to make more graphs, just put different numbers into the X and Ys and it’ll draw the right graphs for you. Now what we’re going to make is the stuff that makes that work, it’s not that hard. Let’s start doing some stuff that you can actually see on a graph. Type the following:

```
A=(0,Y1)
```

Hopefully you’re already familiar with polar coordinates, they’re used a lot in maths for drawing points and things. You should notice a black point labelled `A`

appear on the canvas. Also there is now an object `A`

in the dependant objects. It depends on `Y1`

, which is cool because it means when we change the value in `Y1`

then it will affect the value of `A`

. Now let’s do the other 4 points:

```
B=(X/4,Y2)
C=(X/2,Y3)
D=(X/4*3,Y4)
E=(X,Y5)
```

These points are described in the summary points above at **point 5**. `C`

is the midpoint of the river, so its x-coordinate is half of the length of the `X`

of the graph. Because `B`

is halfway between the midpoint and the start, it’s a quarter of `X`

. By the same reasoning `D`

will be 3 quarters of `X`

(i.e. `X/4*3`

which is the same as `X`

÷4×3). The last point `E`

is at the end, therefore has the value of `X`

and the last `Y`

. I hope this all makes sense because it’s crucial and there’s not much more I can do to explain; read it again if you don’t get it at first. Continuing, click the button that looks like this:

Now click and drag the canvas (the place where the points appear) and scroll with the mouse wheel until you get your screen looking like this:

So now all the points are in place, all we need to do is join them together with lines so that they make a nice looking graph! Notice how if you change the values of `Y1`

…`Y5`

or `X`

the points move around and adjust themselves. Impressed? Not really? Ok, let’s finish this off.

Before we can draw the lines of the geograph there are 2 more points we need add; the points at the *bottom left* and *bottom right* that we use to draw the line along the bottom of the graph to connect the first and last points. To find out where to put them we need to find the lowest point of the graph and to do that we’re going to use something called an array. An array is usually a group of similar data, in this case it’s actually something like a **list**, but it sounds cooler when you call it an array. We’re going to define an array for all the `Y`

-points `Y1`

…`Y5`

by typing the following:

```
{Y1, Y2, Y3, Y4, Y5}
```

The curly brackets tell GeoGebra that you’re giving it a list of items, which you separate using commas. Now that we have this array we can do calculations on it using all the `Y`

values, such as finding the minimum value of `Y`

with the `Min[]`

function:

```
F=(X, Min[Y])
G=(0, Min[Y])
```

`G`

is at `0`

, the left-hand side of the graph, and `F`

is at the other end. As you type in the code you should see the points appear at the bottom of the graph. What’s cool about what we just did is that if you change the values of one of your `Y1`

…`Y5`

so that one of them is even lower than the current lowest, these 2 points will shift along with it to the new lowest point on the graph!

The hard part is over now, the rest of this is really straight forward. To draw the lines you can click the polygon button, it looks like this:

and then click each point on the graph, starting with `A`

, through `G`

, and ending with `G`

again. Or just type the following:

```
geograph=Polygon[A, B, C, D, E, F, G]
```

Now all the points are connected and it’s just a matter of polishing things up a bit. Now that we’re done working with them we’ll hide the object names (the letters `A`

,`B`

,`C`

,`D`

… etc.) as we don’t really want those shown when we print out the graphs. Summon the **Object Properties** menu by right-clicking an object (those things in the left pane that we’ve been creating) and selecting Object Properties. The option is also available from the View menu or the keyboard shortcut *List* and *numbers* don’t have labels on the graph anyway, so you can leave those. Select all the *points*, *polygons *and *segments*. You can select everything between 2 items by selecting the first item, pressing and holding the Shift key and then clicking the last item. Now that they’re all selected uncheck the box that says **Show Label**. You should have something like this:

and now when you close the dialogue all those messy labels will be gone. As a last touch we’re going to add some text labels. You get them from the **Insert Text** button, like this:

You can use that to label your axes and write the title of your GeoGraph. And that’s that. All done! Save this file as geograph-template.ggb or something like that. Now you don’t have to go through the process of making points for each graph. Just enter the values for `X`

and `Y1`

to `Y5`

from your field data into the corresponding variables, the points and lines automatically move themselves around to form the new geograph and voila! Click File > Save-As area-1.ggb (or some other sensible name) and repeat for as many graphs as you need to do! Now doesn’t that make life easier?

# An Example Geograph file

If you want to make sure you did it right, or if you decided to skip this whole tutorial (which I hope you don’t) and just want the file the ‘does the graphs’ you can download it from here: clickme. That file is exactly what you should have by the end of this tutorial.

# The End

Thanks for reading this, I know it was long, but that’s only because I wanted it to be easy to understand. If there’s anything I’ve left out, or that you think I need to add, please let me know in the comments section below. In fact, if you have any comments, criticisms, complaints, queries (I’m on a role with this alliteration!) or whatever, please feel free to comment. If you found this useful (or maybe even if you didn’t) please consider *following* this blog as I’m bound to post something useful or interesting to you in the future, and in return I promise not to spam you with stuff nobody would want to read!