par {base} | R Documentation |
par
can be used to set or query graphical parameters.
Parameters can be set by specifying them as arguments to par
in
tag = value
form, or by passing them as a list of tagged
values. In either case the previous values are returned in an
invisible tagged list. Such a list can be passed as an argument to
par
to restore the parameter values.
Parameters are queried by giving vectors of character strings to
par
. In this case, the values are returned in a tagged list.
par(...)
adj |
The value of |
ann |
If set to |
bg |
The color to be used for the background of plots. A description of how colors are specified is given below. |
bty |
A character string which determined the type of box which
is drawn about plots. If |
cex |
A numerical value giving the amount by which plotting text and symbols should be scaled relative to the default. |
cex.axis |
The magnification to be used for axis anotation relative to the current. |
cex.lab |
The magnification to be used for x and y labels relative to the current. |
cex.main |
The magnification to be used for main titles relative to the current. |
cex.sub |
The magnification to be used for sub-titles relative to the current. |
col |
A specification for the default plotting color. A description of how colors are specified is given below. |
col.axis |
The color to be used for axis annotation. |
col.lab |
The color to be used for x and y labels. |
col.main |
The color to be used for plot main titles. |
col.sub |
The color to be used for plot sub-titles. |
crt |
A numerical value specifying (in degrees) how strings should be rotated. It is unwise to expect values other than multiples of 90 to work. |
csi |
(Unimplemented) The height of characters in inches. |
err |
(Unimplemented) The degree of error reporting desired. |
fg |
The color to be used for the foreground of plots. This is the default color is used for things like axes and boxes around plots. A description of how colors are specified is given below. |
fig |
A numerical vector of the form |
fin |
A numerical vector of the form |
font |
An integer which specifies which font to use for text. If possible, device drivers arrange so that 1 corresponds to plain text, 2 to bold face, 3 to italic and 4 to bold italic. |
lab |
A numerical vector of the form |
las |
(Unimplemented) the style of axis labels. 0=always parallel to the axis, 1=always horizontal, 2=always perpendicular to the axis. |
lty |
The line type.
Line types can either be specified as an integer (1=solid, 2=dashed,
3=dotted 4=dotdashed) or as one of the character strings
|
mai |
A numerical vector of the form |
mar |
A numerical vector of the form |
mex |
|
mfcol |
This is a vector of the form |
mfg |
A numerical vector of the form |
mfrow |
This is a vector of the form |
mgp |
The margin line for the axis title, axis labels and axis
line. The default is |
mkh |
The height in inches of symbols to be drawn when the value
of |
oma |
A vector of the form |
omd |
A vector of the form |
omi |
A vector of the form |
pch |
Either an integer specifying a symbol or a single character to be used as the default in plotting. |
pin |
The width and height of the current plot in inches. |
plt |
A vector of the form |
pty |
A character specifying the type of plot region to be used;
|
smo |
(Unimplemented) a value which indicates how smooth circles and circular arc should be. |
srt |
The string rotation in degrees. Causes |
tck |
The length of tick marks as a fraction of the smaller of
the width or height of the plotting region.
If |
tmag |
A number specifying the enlargement of text of the main title relative to the other annotating text of the plot. |
usr |
A vector of the form |
xaxp |
A vector of the form |
xaxs |
(Unimplemented) The style of axis interval calculation to be used for the x-axis. |
xaxt |
A character which specifies the axis type.
Specifying |
xlog |
A logical value. If |
xpd |
A logical value.
If |
yaxp |
A vector of the form |
yaxs |
(Unimplemented) The style of axis interval calculation to be used for the y-axis. |
yaxt |
A character which specifies the axis type.
Specifying |
ylog |
A logical value. If |
Colors can be specified in several
different ways. The simplest way is with a character string giving
the color name (e.g., "red"
). A list of the possible colors
can be obtained with the function colors
.
Alternatively, colors can be specified directly in terms of there RGB
components with a string of the form "#RRGGBB"
where each of
the pairs RR
, GG
, BB
consist of two hexidecimal
digits giving a value in the range 00
to FF
. Colors can
also be specified by giving an index into a small table of colors.
This provides compatibility with S.
The functions rgb
, hsv
, gray
and rainbow
provide additional ways of generating colors.
Line types can either be specified by
giving an index into a small built in table of line types (1=solid,
2=dashed, 3=dotted) or directly as the lengths of on/off stretches of
line. This is done with a string of up to eight characters which give
the lengths in consecutive positions in the string. For example, the
string "33"
specifies three pixels on followed by three off and
"3313"
specifies three pixels on followed by three off followed
by one on and finally three off.
colors
, gray
, rainbow
,
rgb
;
options
for other setup parameters;
graphic devices x11
, postscript
.
op <- par(mfrow = c(2, 2), # 2 x 2 pictures on one plot
pty = "s") # square plotting region, independent of device size
## At end of plotting, reset to previous settings:
par(op)