Chapters:
1: Introduction
2: Simple example
3: Invocation
4: Finer Control
5: X-Y Plots
6: Contour Plots
7: Image Plots
8: Examples
9: Gri Commands
10: Programming
11: Environment
12: Emacs Mode
13: History
14: Installation
15: Gri Bugs
16: Test Suite
17: Acknowledgments
18: License
Indices:
Concepts
Commands
Variables
|
4.2: Axis scaling
Gri normally assumes that you are plotting scientific graphs, and
therefore whenever it sees a command like `draw curve ' or
`draw symbol ', it draws an appropriate axis first. You can turn
this feature off, by using `draw axes none ' before the other
`draw ' command.
Furthermore, Gri picks axis scales by itself, by scanning the (`x ',
`y ') columns. If you don't like the scales Gri picks, you can
override them (see Range).
Gri normally draws axes labelled at left and bottom, and with an axis
frame with tics all around. If you don't like this default axis style
you can specify other styles. For example, if the commands
`draw x axis ' and `draw y axis ' are placed before the `draw curve '
command, Gri will realize you've already specified axes, and just draw
them on the left and bottom sides of the box, without completing the
axis frame.
For your general use, Gri stores the minimum and maximum x and y values
of the axes in the variables `..xleft.. ', `..xright.. ',
`..ybottom.. ', and `..ytop.. '; for the minimum and maximum
values of the data, use the built-in rpnfunctions `min ',
`max ', and `mean ' (see Rpnfunction). It stores the last
(x,y) pair on a curve (whether data or axis) as
(`..xlast.. ',`..ylast.. '). Also, Gri stores the axis sizes in
`..xsize.. ' and `..ysize.. '. It stores the space to the left
of the plot in `..xmargin.. ' and the space below the plot in
`..ymargin.. '.
The axis scales are not changed by mathematical operations on the
columns, regardless of whether the scales were set manually (by a
`set x|y axis ' command), or by Gri (during a `read columns '
command). In the former case, this is what you probably want, but in
the latter case it can lead to graphs with no data, because the scale
does not apply to the transformed data. This might be considered a bug;
in any case, you can avoid it by transforming the built-in variables
`..xleft.. ' and `..xright.. ' whenever you transform the x
column, and `..ybottom.. ' and `..ytop.. ' whenever you
transform the y column.
|