Chapter 7 - Graph Display
What is the graph display?
The graph display is the display mode when you enter graphing or drawing.
You have access to many drawing functions that the home display does not have. Here, again,
is a table showing some advantages and disadvantages between the home and graph display.
Home screen | Graph Display |
16 columns by 8 rows | 94 pixels by 62 pixels |
Advantages |
Simple input and output routines Large font |
Drawing functions More space to work with |
Disadvantages |
Smaller screen space No drawing functions |
Displaying text requires exact pixels Non-monotype font No built-in input feature (besides getKey) |
Setting up
To use the graph display mode effectively, you must first set up the window for drawing.
Usually, this means that you want to turn of axes, functions, and plots, set up the window
variables, and clear the screen.
- AxesOff, CoordOff, GridOff
-
You can turn the axes, coordinates, and grids off with the statements AxesOff, CoordOff, and GridOff,
all found under the [2nd] FORMAT menu.
- FnOff; PlotsOff
-
You can turn the functions and plots with the FnOff ([VARS] Y-VARS 4:On/Off 2:FnOff) and
PlotsOff ([2nd] STAT PLOT 4:PlotsOff).
- ClrDraw
-
ClrDraw clears the graph display.
- Setting up the window
-
Hit [VARS] 1:Window to access these variables:
- Xmin/Xmax - sets the minimum X value (left side of the screen) and maximum X value (right side of the screen) of the graph display.
- Ymin/Ymax - sets the minimum Y value (bottom of the screen) and maximum Y value (top of the screen) of the graph display.
Putting all this information, here is a typical way to set up the graph display:
GridOff
ClrDraw
PlotsOff
FnOff
AxesOff
0->Xmin
94->Xmax
0->Ymin
62->Ymax
Drawing on the graph
Now that you know how to set up the graph display, we can begin to use the draw functions.
Hit [2nd] DRAW to enter the draw menu. [2nd] DRAW POINTS brings you to the points and pixels functions,
and [2nd] DRAW STO brings you to the pictures and graph database storing functions.
- Points
-
Points are determined by the window setting you provide. You can turn on, off, or change points.
- Pt-on(x,y[,type]) - This turns a point on at (x,y). The type can be 1 (dot), 2 (box), or 3 (cross).
Leave the type off for a default of 1.
- Pt-off(x,y[,type]) - This turns a point off at (x,y).
- Pt-change(x,y) - Turns a point on if off, or off if on, at (x,y).
- Pixels
-
Points are not determined by the window setting you provide. Instead, the top-left pixel is (0,0) and the
bottom-right pixel is (92,42). The coordinate system is (row, column), not (x,y).
- Pxl-on(row, column) - This turns a pixel on at (row, column).
- Pxl-off(row, column) - This turns a pixel off at (row, column).
- Pxl-change(row, column) - Turns a pixel on if off, or off if on, at (row, column).
- Pxl-test(row, column) - This returns 1 if the pixel at (row, column) is, or a 0 if the pixel is off.
- Lines
-
- Line(x1,y1,x2,y2): this draws a line from (x1,y1) to (x2,y2).
- Line(x1,y1,x2,y2,0): this erases a line from (x1,y1) to (x2,y2).
- Circles
-
Circle(x,y,r): draws a circle centered at (x,y) with a radius of r.
- Horizontal/Vertical
-
Horizontal and vertical lines are useful when you want to quickly draw a line across the length of the screen.
- Horizontal y : this draws a horizontal line at y.
- Vertical x : this draws a vertical line at x.
- Storing/Recalling pictures
-
You can save the contents of the graph screen into a picture ([VARS] 4:Pictures).
- StorePic n : saves the contents graph display with a number, n, from 0 to 9.
- RecallPic n : recalls a saved picture (n being from 0 to 9).
Text on the graph
You can write using small font with the Text function. The coordinate system of (row, column) is the same
one used when drawing pixels.
- Text(row, column, text [,text2, text3, ... textn]) : Writes text at (row, column). Optional text
(text2, text3, ... textn) can be appended to the original text.
|