R Plot PCH Symbols Chart

Following is a chart of PCH symbols used in R plot. When the PCH is 21-25, the parameter "col=" and "bg=" should be specified. PCH can also be in characters, such as "#", "%", "A", "a", and the character will be ploted.

Values pch=26:32 are currently unused, and pch=32:255 give the text symbol in a single-byte locale. In a multi-byte locale such as UTF-8, numeric values of pch greater than or equal to 32 specify a Unicode code point.
If pch is an integer or character NA or an empty character string, the point is omitted from the plot. Value pch="." is handled specially. It is a rectangle of side 0.01 inch (scaled by cex). In addition, if cex = 1 (the default), each side is at least one pixel (1/72 inch on the pdf, postscript and xfig devices).

pch=2,triangle point up
pch=6,triangle point down
pch=7,square cross
pch=9,diamond plus
pch=10,circle plus
pch=11,triangles up and down
pch=12,square plus
pch=13,circle cross
pch=14,square and triangle down
pch=15, filled square blue
pch=16, filled circle blue
pch=17, filled triangle point up blue
pch=18, filled diamond blue
pch=19,solid circle blue
pch=20,bullet (smaller circle)
pch=21, filled circle red
pch=22, filled square red
pch=23, filled diamond red
pch=24, filled triangle point up red
pch=25, filled triangle point down red

By default, pch=1 if not specified, and in black color:

>x <- c(2,1,3,2,5,3.3,1.4);
>y <- c(4,2.7,6,3,8,6,2.2);

cex controls the symbol size in the plot, default is cex=1,
col controls the color of the symbol border, default is col="black".

Plot with specified PCH, Color and Size:


endmemo.com © 2023  | Terms of Use | Privacy | Home