Function: math[cartgridR3] - plots a cartesian grid
Calling Sequence:
cartgridR3(h);
cartgridR3(h, plot options);
cartgridR3(h, v);
cartgridR3(h, v, plot options);
Parameters:
h
- horizontal range of the form
x=x1 .. x2
or
x1 .. x2
v
- vertical range of the form
y=y1 .. y2
or
y1 .. y2
Description:
In the first form, cartgridR3 produces a grid with the horizontal and vertical range being the same.
In the second form, cartgridR3 produces a grid with different horizontal and vertical ranges.
By default the grid ('graph paper') is printed in gray color and with thickness=1. You may specify another color or thickness for the grid by passing the corresponding plot options to cartgridR3.
The default color can be changed by assigning the global variable cartgridR3Color a different color. The default thickness can be changed by assigning the global variable cartgridR3Thickness a positive integer.
You may pass any other valid plot options to cartgridR3.
The distance between two neighbouring lines is 1 by default. If you pass a constant n with the step option, the distance between neighboring horizontal and vertical lines is n. n should be a positive rational or integer. You may also pass a list of two positive rational or integer values with step. The first element specifies the distance between two neighboring vertical lines, the second the distance between two neighboring horizontal lines.
You may move the grid r units to a specific direction using the adjust option. If r is of type realcons and positive, then the grid is moved r units to the right and above. If r is negative, the grid is moved r units to the left and below. If a list of two rational or integer values [r1, r2] is passed with this option, the grid is moved horizontally r1 units and r2 units vertically. Default is 0 or [0, 0].
The return is a PLOT structure generated using plots[implicitplot].
This function is faster than creating a cartesian grid with plots[coordplot], which is new in Release 4.
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, cartgridR3).
Examples:
> with(math, cartgridR3):
> cartgridR3(x=-4 .. 4);
> cartgridR3(x=-4 .. 4, y=-5 .. 5);
> cartgridR3(x=-4 .. 4, -5 .. 5, step=2);
> cartgridR3(-4 .. 4, -5 .. 5, color=red, step=[1, 2], thickness=2);
See Also:
math/gridplot , math/pointgridR3 , plots/implicitplot , plot/color.
Version History:
Version 1.00 - April 11, 1997
Version 1.01 - April 13, 1997
Version 1.02 - April 17, 1997
Version 1.03 - April 25, 1997
Version 1.04 - September 27, 1997
Version 1.1 - January 07, 1998
Version 1.1.1 - October 03, 1998