Graphs

A graph is a two-dimensional representation of data.
A typical example would be a graph of some quantity varying with time,
e.g. daily temperature.
In science,
we often use graphs to give us a picture of the relationships between
variables.
Let's first look at the basic construction of graphs.

  • A graph is a visual representation of a relationship between two variables,
    x and y.
  • A graph consists of two axes called the x (horizontal) and y (vertical) axes.
    These axes correspond to the variables we are relating.
    In science we will usually give the axes different names,
    such as time and temperature.
  • The point where the two axes intersect is called the origin.
    The origin is also identified as the point (0, 0),
    where both x and y have values of zero.

A point is the basic relationship displayed on a graph.
Each point is defined by a pair of numbers containing two coordinates.

A coordinate is a number used to identify
the location of a point on a graph.

Each point is identified by both an
x and a y coordinate.

The x-coordinate of a point is the value that tells you how far
from the origin the point is on the horizontal, or x-axis.

Once you have the coordinates of a point you can use the ordered pair
notation for labeling points.
Points are identified by stating their coordinates in the form of (x, y).
Note that the x-coordinate always comes first.

Creating a graph with data points is just the opposite procedure:
for each (x,y) pair, read along the x axis to the first value (x)
and construct a vertical line through that value on the x-axis;
then read along the y-axis to the second value (y) and construct
a horizontal line through that value.
The point where the two lines cross is the position of the data point.
When you have marked all the data points,
connect them by straight lines, left to right.

Besides drawing graphs of measured data values,
we can also use them to show the behaviour of mathematical functions.
For example, the function y = 2 * x (two times x) can be drawn by
computing y for several values of x, typically evenly spaced,
say by increments of one.

More complex graphs will be curves,
representing combinations of functions such as sine, cosine, etc.

Some of these graphs can be quite pretty, such as the
spirograph,
Lissajous, and

harmonograph.