Remarks on the dreaded par()
Remarks on the dreaded par()
This page will grow. I intend to give help on the reading of the help
page for par(). I have made a copy of the Splus
help page for par() as an html
document. I will insert a few links into it to point you at some of
the simpler uses for par().
I found Chapter 9 of the
Spector book to be very good as an overview
of the sorts of effects one can achieve using low-level commands in Splus.
Sections of the Splus help for par()
- OPTIONAL ARGUMENTS
- THE PARAMETERS CATEGORIZED
- Graphical PARAMETERS
can be divided into four groups:
- HIGH-LEVEL PARAMETERS
can only be used in graphics functions, not in par.
- GENERAL PARAMETERS
may be set by the par function or by giving
them as named arguments to other graphics functions. When given through
par, the graphical parameters are set until changed or until a new call to
a device; otherwise, they are reset at the end of the function call in
which they were specified.
- LAYOUT PARAMETERS
can only be used in par, using them in graphics functions
has no effect.
- INFORMATION PARAMETERS
provide information
about the current state of the current graphics device.
- VALUE
- SIDE EFFECTS
- DETAILS
- REFERENCES
- BUGS
- SEE ALSO Splus help on
options, axis, box, frame, title, text, mtext, plot, hist.
- EXAMPLES
Specific topics
Page sizes
Having trouble getting your plots to fit on the page, or having
trouble with labels getting cut off by the printer? You need to
understand the coordinate sytem used by Splus for drawing, and how the
drawing surface relates to the printed page.
Start with the situation of a single plot (no mfrow or
split.screens). Splus places a figure region as a rectangle within another
rectangle called the device surface. The figure itself is
made up of an inner rectangular region called the plot region
and a surrounding border called the margin.
When you use a high level function, such as plot(), it draws various
points and lines within the plot region and it adds various axis
labels and titles in the margin region. The usr parameter gives the current way Splus
interpret positions on the figure.
My first instinct was to think in terms of inches, using parameters like
pin
and
din as guides to placement on the screen.
However, these parameters do not change when when changes the window
size using the mouse, or by tiling. What you see on your screen
cannot be exactly what you will get when you print.