Guest Observer Facilities & Science
Centers |
NASA Archives |
|
Next: Hardcopy
Up: PLT Command Summary
Previous: GAp
Grid [clist]
Control the plotting of a grid, where [clist] is one or more of
ON, OFf, X # #, Y # #. For Grid ON, the major tic marks are
expanded to place a grid over the entire plot. Grid OFf turns off
the grid replacing the tic marks. PGPLOT automatically selects the
location of the major and minor tic marks. The Grid command allows you to
override this selection. For example, Grid X 10,2 would divide
the x-axis into 10 major divisions and then divide each major division
into 2 minor divisions. Use Grid X 0,0 to go back to the default
grid. The number -1 can be used to suppress the plotting of tic marks.
Thus, Grid X -1 0 would only plot minor tic marks on the x-axis
and Grid Y -1 -1 would prevent any tic marks from being plotted on
the y-axis.
IMPORTANT: PGPLOT only places major tic marks at locations where
the least significant digit of the range increments by integer amounts.
If you attempt to force PGPLOT to violate this condition, then
unexpected things may happen. For example, suppose you had used
R Y 0 .15, in which case the range is 0.15 and the least significant
digit is 0.01. Then using Grid Y 3,2 would place grid lines at
intervals of 0.05. However, if you had tried Grid Y 2,2, then the
grid lines would occur at intervals of 0.075, where the last digit
(5) is not a significant digit. In this case, the plot will be
incorrectly labeled. Grid X 1.5,2 is legal and would correctly
produce labels at intervals of 0.1. (Of course, only one label would
actually be plotted in this case.)
Web Page Maintained by: Dr. Lawrence E. Brown elwin@redshift.gsfc.nasa.gov
|