Graphical elements



next up previous contents
Next: Axes and Tick Up: Graphics parameters list Previous: Graphics parameters list

Graphical elements

S plots are made up of points, lines, text and polygons (filled regions.) Graphical parameters exist which control how these graphical elements are drawn, as follows:


pch="+"
Character to be used for plotting points. The default varies with graphics drivers, but it is usually `*' for terminals or window devices, and `' for PostScript devices. Plotted points tend to appear slightly above or below the appropriate position unless you use "." as the plotting character, which produces centred points.
pch=4
When pch is given as an integer between 0 and 18 inclusive, a specialised plotting symbol is produced. To see what the symbols are, use the command

legend(locator(1),as.character(0:18),marks=0:18)


lty=2

Line types. Alternative line styles are not supported on all graphics devices (and vary on those that do) but line type 1 is always a solid line, and line types 2 and onwards are dotted or dashed lines, or some combination of both.


lwd=2

Line widths. Desired width of lines, in multiples of the `standard' line width. Affects axis lines as well as lines drawn with lines(), etc.


col=2

Colours to be used for points, lines, text, filled regions and images. Each of these graphic elements has a list of possible colours, and the value of this parameter is an index to that list. Obviously, this parameter applies only to a limited range of devices.


font=2

Font to use for text. The appropriate value of this parameter is dependent on the graphics device being used; for the postscript() device this is an index to the system dataset ps.fonts.


adj=-0.1

Justification of text relative to the plotting position. 0 means left justify, 1 means right justify and 0.5 means to centre horizontally about the plotting position. The actual value is the percentage of text that appears to the left of the plotting position, so a value of -0.1 leaves a gap of 10% of the text width between the text and the plotting position.


cex=1.5

Character expansion. The value is the desired size of text characters (including plotting characters) relative to the default text size.




next up previous contents
Next: Axes and Tick Up: Graphics parameters list Previous: Graphics parameters list



Erik Moledor
Tue Jan 31 21:02:18 EST 1995