Contents Previous Next Subchapters

Adjusting The Space Around The Plotting Region
Syntax gspace
gspace(
leftrightbelowabove)
See Also gaddview , gxyztitle

Description
If no arguments are present, returns a real four-element row vector containing the values of left, right, below, and above that correspond to the current spacing for the current viewport.

If the arguments are present, sets the amount of space, within the current viewport, that is excluded from the plotting region. This space is used for tick marks, tick mark labels, axis labels and the viewport title. Depending on the size of a viewport and the font used for labeling, it may be necessary to use this function to adjust the space allocated for labeling within a viewport.

The arguments left, right, below, and above are integer, real, or double-precision scalars. They specify the space that is reserved (to the left, to the right, below, and above the plotting region) as a fraction of the viewport size. All of the arguments must be between 0 and 1.

The width of the plotting region is equal to (1 - right - left) times the width of the viewport. The height of the plotting region is (1 - above  - below) times the height of the viewport. If the plotting window has an aspect ratio of 1, and if the width of the viewport is equal to its height, and if right + left is equal to above + below, the plotting region will have an aspect ratio of 1.

Example
If you enter
     ginit
     gspace(.1, .01, .1, .01)
     gplot(seq(2))
O-Matrix will draw a plot that has more labeling space to the left and below than it has to the right and above.