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()

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.