yorick banner

Home

Manual

Packages

Global Index

Keywords

Quick Reference

Back: logxy Forward: palette   FastBack: Plotting primitives Up: Plot limits FastForward: Display list         Top: Yorick Contents: Table of Contents Index: Concept Index About: About this document

3.2.3 gridxy

The gridxy command changes the appearance of your plot in a more subjective way than logxy or limits. Ordinarily, Yorick draws tick marks resembling ruler scales around the edges of your plot. With gridxy, you can cause the major ticks to extend all the way across the middle of your plot like the lines on a sheet of graph paper. Like logxy, with gridxy you get separate control over horizontal and vertical grid lines. However, with gridxy, if you supply only one argument, both axes are affected (usually you want grid lines for neither axis, or grid lines for both axes). For example,

 
gridxy, 1      // full grid, like graph paper
gridxy, 0, 1   // only y=const grid lines
gridxy, , 0    // turn off y=const lines, x unchanged
gridxy, 1,     // turn on x=const lines, y unchanged
gridxy, 0      // ticks only, no grid lines

If the flag value is 2 instead of 1, then instead of a full grid, only a single grid line is drawn at the "roundest number" in the range (zero if it is present). If you need a reference line at y = 0, but you don't want your graph cluttered by a complete set of grid lines, try this:

 
gridxy, 0, 2

The appearance of the ticks and labels is actually part of the graphics style. You will want to change other details of your graphics style far less frequently than you want to turn grid lines on or off, which explains the separate gridxy function controlling this one aspect of graphics style.

The gridxy command also accepts keyword arguments which change the default algorithm for computing tick locations, so that ticks can appear at multiples of 30. This makes axes representing degrees look better sometimes. By default, ticks can appear only at "decimal" locations, whose last non-zero digit is 1, 2, or 5. See the online help for gridxy for a more complete description of these options.


Back: logxy Forward: palette   FastBack: Plotting primitives Up: Plot limits FastForward: Display list         Top: Yorick Contents: Table of Contents Index: Concept Index About: About this document