There will also be a toolbar at the top of the window which provides basic functions, and a status bar at the bottom which displays information.
You can right click on the Plotter window for a menu.
From left to right, the toolbar buttons are:
A Function Editor contains four items. From left to right these are:
To plot a function, type it into the Function Edit Box and then press
Plotter will then draw this function on the graph. For example type
2*x + 3
to draw a graph of the function
y = 2x + 3. Note that the times sign *
is required (see Syntax for Functions).
Plotter can draw graphs containing more than one function. To find out how, see
Adding and Removing Functions.
Syntax for Functions
Plotter functions are actually Python expressions, so the syntax for Plotter functions
is the same as that for Python. Don't worry if you don't know Python; the syntax
is pretty straightforward. All the normal mathematical operators and functions
are . This table shows the standard arithmatical functions available:
|Operator||What it does|
When you type in a function, Plotter checks it for mistakes. If it finds any problems, it displays a message showing the error information. This should enable you to correct the error and continue. The two most common types of errors are SyntaxErrors (caused by problems with syntax, often brackets, commas etc) and NameErrors (caused by tyring to call a function or use a variable that doesn't exist). As mentioned above, in contrary to normal algebra you must always use multiplication signs when entering functions.
By default, functions are evaluated in a namespace into which the Python
module has been imported. This means that the standard mathematical functions are available,
as well as the constants
e. The following mathematical
functions are available (reproduced from the Python documentation):
|acos (x)||Return the arc cosine of x.|
|asin (x)||Return the arc sine of x.|
|atan (x)||Return the arc tangent of x.|
|atan2 (y, x)||Return atan(y / x).|
|ceil (x)||Return the ceiling of x as a real.|
|cos (x)||Return the cosine of x.|
|cosh (x)||Return the hyperbolic cosine of x.|
|exp (x)||Return e**x.|
|fabs (x)||Return the absolute value of the real x.|
|floor (x)||Return the floor of x as a real.|
|fmod (x, y)||Return x % y.|
|frexp (x)||Return the matissa and exponent for x. The mantissa is positive.|
|hypot (x, y)||Return the Euclidean distance, sqrt(x*x + y*y).|
|ldexp (x, i)||Return x * (2**i).|
|log (x)||Return the natural logarithm of x.|
|log10 (x)||Return the base-10 logarithm of x.|
|pow (x, y)||Return x**y.|
|sin (x)||Return the sine of x.|
|sinh (x)||Return the hyperbolic sine of x.|
|sqrt (x)||Return the square root of x.|
|tan (x)||Return the tangent of x.|
|tanh (x)||Return the hyperbolic tangent of x.|
Plotter can easily be extended to add new functions if required
(see Extending Plotter).
For more information about the specifics of Python syntax,
you should consult the Python documentation, which is available from the
Python web site.
Types of Function
Plotter supports three different types of function. To change the type
of a function, click on the Function Type Button to the left of the
Function Edit Box, and then select the function type from the drop-down
menu that appears.
This table shows the three function types that Plotter supports:
|Menu Option||Function Type||Comment|
||Enter an expression in terms of x. y is calculated
for many values of x, and the points (x,y) are plotted.
||Enter two expressions in terms of t seperated by a comma.
x and y are calculated for many values of t
and the points (x,y) are plotted.
||Enter an expression in terms of t. r is calculated for many
values of t, and then the cartesian coordinates of those points are calculated
Only positive values of r are plotted.
The default function type for new functions is Cartesian (
Here are some examples of Plotter functions, to show how the syntax is used.
The way the functions would be written algebraicly is shown for comparison.
Note that, when converting from algebraic functions to Plotter functions, you
often have to insert brackets and multiplication signs. You can find these
example functions in the
examples.plot file in the Plotter examples
|Algebraic Function||Function Type||Plotter Function||Comment|
|y = 2x + 3||Cartesian (y =)||
|y = x^2||Cartesian (y =)||
|y = sin x||Cartesian (y =)||
||Sine wave where x is in radians|
|r = t||Polar (r =)||
|r = 5sin 5t||Polar (r =)||
||Flower shape with five petals|
|x = 4t, y = 4/t||Parametric (x, y =)||
|x = 5cos t, y = 3 sin t||Parametric (x, y =)||
||Ellipse with major radius 5 and minor radius 3|
In order to visually distinguish between functions on a graph, it is helpful to colour
them in different colours. To choose the colour in which a particular graph is plotted,
click on the Colour Selection Button at the right-hand end of the Function Editor. This will
allow you to pick the colour for the function from a graphical list. When you have chosen
a colour, the function is redrawn on the graph in the new colour.
You can change the range of colours available for graphing on the Colour tab in
the Options dialog box.
Zooming and Panning graphs
Once you have drawn a graph, you may want to change your view of it
by altering the area of the graph you can see. You do this by Zooming (enlarging
and reducing the view) and Panning (moving the view around). You can also
set the area of the graph shown exactly by specifying the plot range
manually (see Axes Options).
To pan the graph, hold down the pan mouse button (by default the left mouse button), and drag the mouse. The new position of the axes is shown as you drag. When you release the mouse button, the graph is redrawn in the new position.
There are two different ways of zooming in Plotter. The first is used when you want to zoom in on a region. The second method is used for zooming in and out by a fixed amount; for information about this see Zooming In and Out.
To zoom to a region, place the mouse at one corner of the region, and hold down the zoom mouse button (by default this is the middle button). Drag the mouse towards the other corner of the region on which you wish to zoom in. You will notice that the zoom region is shown on the status bar. When you release the mouse button, the graph is zoomed and redrawn.