Written and maintained by CASRAI Editorial Board
Last updated
Who this is for: anyone drawing scatter plots in base R who needs to choose, change or debug the pch argument. After reading, you can pick a symbol by number, build your own symbol chart in two lines, fill shapes with a second colour, and explain why a symbol did not appear.
Short answer: pch stands for plotting character. In base R graphics it is an argument of plot() and points() that selects the symbol drawn at each data point, either as an integer code (0 to 25 are the vector symbols) or as a single character such as "+".
What does PCH stand for in R (and in R Studio)?
In R, pch means “plotting character”. The R documentation for points describes it as the plotting character, “i.e., symbol to use”, and says it can be a single character or an integer code for one of a set of graphics symbols. RStudio is only the editor: it runs the same R graphics code, so pch means the same thing there as in a terminal R session.
What does PCH stand for in BIOS?
The same three letters are used in computer hardware, which has nothing to do with R plotting. This page covers only the R argument.
What it is used for in research
Symbol choice carries information in a figure. When a scatter plot has several groups, a different pch per group keeps the groups distinguishable when the figure is printed in greyscale, and open versus filled symbols can separate observed from imputed values or treatment from control. Because pch, col, bg, cex and lwd can all be vectors, one call can map a grouping variable onto symbols (documented behaviour: vectors are recycled as needed, giving a value for each point plotted).
Install or access (official source only)
Nothing extra is needed. plot() and points() belong to the graphics package that ships with base R. Download R from the official CRAN site at cran.r-project.org. The reference page for this argument is R-devel: Add Points to a Plot (?points), read 2026-11-07. In any session, ?points opens the same text.
Step-by-step: choose and apply a plotting symbol
- Draw a plot with an explicit symbol. Run
plot(cars, pch = 19).carsis a dataset that ships with R. Symbol 19 is a solid circle. - Change the symbol. Replace the number:
plot(cars, pch = 17)draws filled triangles. A single character also works:plot(cars, pch = "+"). - Scale the symbol. Add
cex, a multiple of the current default size:plot(cars, pch = 19, cex = 1.5). - Colour the symbol. Add
col:plot(cars, pch = 19, col = "steelblue"). - Use a fill colour. Only symbols 21 to 25 take a separate fill.
colsets the border andbgsets the interior:plot(cars, pch = 21, col = "black", bg = "grey"). - Add points to an existing plot.
points(x, y, pch = 4)uses the same arguments. In a legend, pass the samepchvalues so the key matches the plot. - Vary the symbol by group. Give
pcha vector as long as the data, for examplepch = c(1, 2, 3)[as.integer(g)]wheregis a factor with three levels.
Build your own symbol chart (shapes in R, 0 to 25)
The R documentation’s own chart is easy to reproduce. This draws every symbol with its number above it:
plot(NA, xlim = c(-0.5, 25.5), ylim = c(0, 1), axes = FALSE, xlab = "", ylab = "") points(0:25, rep(0.3, 26), pch = 0:25, bg = "grey") text(0:25, 0.6, 0:25, cex = 0.5)
The grey interior appears only on symbols 21 to 25, which is how you see for yourself which shapes accept bg.
Output and how to read it: the full pch map
The R documentation states that values of pch are stored internally as integers, interpreted as follows (checked 2026-11-07).
| pch value | What R draws |
|---|---|
| NA (integer) | No symbol |
| 0 to 18 | S-compatible vector symbols (the full S set); R draws circles where S used octagons (symbols 1, 10, 13, 16) |
| 15 to 18 | Filled shapes with no border |
| 19 to 25 | Further R vector symbols: 19 solid circle, 20 bullet (smaller solid circle, 2/3 the size of 19), 21 filled circle, 22 filled square, 23 filled diamond, 24 filled triangle point-up, 25 filled triangle point-down |
| 21 to 25 | Border drawn in col, interior filled with bg |
| 26 to 31 | Currently unused and ignored |
| 32 to 127 | ASCII characters |
| 128 to 255 | The corresponding character, if any, in the locale’s character set (single-byte locales; 128 to 159 only used on Windows) |
| Negative value | A Unicode code point where the system supports it; the documentation’s examples are -0x2642L (male sign) and -0x20ACL (Euro) |
Special cases
pch = "."(equivalently 46) is handled specially: a rectangle of side 0.01 inch, scaled bycex. At the defaultcex = 1, each side is at least one pixel. It is the choice for very large point clouds.- Single-character strings are converted to an integer: 32 to 127 for ASCII, usually the Unicode code point otherwise.
- NA or an empty string as
pchomits that point; points whosex,y,pch,colorcexis NA are also omitted. pch = NULL(or length 0) falls back topar("pch").
Troubleshooting
- The fill colour does nothing.
bgapplies only to symbols 21 to 25. Symbols 15 to 20 take their colour fromcol. - A symbol is missing. Values 26 to 31 are unused and ignored, and NA values are dropped. Check
pchfor NA, especially if it was built from a factor lookup. - A multi-letter label shows only one letter. A character string is converted as a single character, so
pch = "ab"is not a way to print two letters; usetext()to place labels. - Symbols 16 and 19 look different. Both are solid circles, but 19 has a border, so it looks larger when
lwdis large relative tocex. Use 16 for no-border consistency. - Semi-transparent fill and border overlap. The documentation warns that with semi-transparent colours on both, results can be device- and viewer-specific.
- Special characters render differently on another machine. Values 128 to 255 depend on the locale’s character set; ASCII (32 to 127) and the vector symbols (0 to 25) do not.
Free alternatives and equivalents
| Tool | Argument | Notes |
|---|---|---|
Base R graphics (plot, points) |
pch |
Integer 0 to 25, ASCII, or a single character, as above |
| ggplot2 (R) | shape |
The same idea with a different interface; see ggplot2 point shapes for the full treatment |
For the surrounding workflow, see scatterplots in R, stripchart in R for one-dimensional point displays, data frames in R for preparing the data you plot, and 3D plots in R.
FAQ
What are the different types of PCH symbols in R?
Four groups: integer codes 0 to 25 (open and filled vector symbols, with 21 to 25 accepting a fill via bg), integer codes 32 to 127 (ASCII characters), 128 to 255 and negative values (locale characters and Unicode code points), and single-character strings such as "+".
How do I draw a plot point type or plot symbol in R?
Set pch in plot() or points(), for example plot(cars, pch = 17). To set the symbol for all later plots in the session, use par(pch = 17), since par("pch") is the default used when pch is not given.
How do I draw a single point in R?
Call points(x, y, pch = 19) on an existing plot, or plot(x, y, pch = 19) to start a new one, with one value each for x and y.
What does PCH stand for?
In R graphics, plotting character. The same three letters stand for other things in other fields, so look for the context (an R function call) before applying this meaning.
Sources (official documentation)
- R Core Team, “Add Points to a Plot”, R-devel graphics package reference (
?points). Read 2026-11-07. - R Project, CRAN, the Comprehensive R Archive Network.







