Skip to main content
v2026.11,858 entries · CC-BY 4.0
LAC HealthMedical & Research SuppliesReagents, PPE & instruments — chain-of-custody documented.Fast, traceable sourcing built for regulated research environments, from bench consumables to instrumentation.Shop lac.us CodeCASRAIlac.us

pch in R: Plot Symbols 0-25, Characters and bg Fill

What pch means in R, the full 0-255 code map, how bg fills symbols 21-25, a two-line chart script, and why a symbol fails to appear.

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

  1. Draw a plot with an explicit symbol. Run plot(cars, pch = 19). cars is a dataset that ships with R. Symbol 19 is a solid circle.
  2. Change the symbol. Replace the number: plot(cars, pch = 17) draws filled triangles. A single character also works: plot(cars, pch = "+").
  3. Scale the symbol. Add cex, a multiple of the current default size: plot(cars, pch = 19, cex = 1.5).
  4. Colour the symbol. Add col: plot(cars, pch = 19, col = "steelblue").
  5. Use a fill colour. Only symbols 21 to 25 take a separate fill. col sets the border and bg sets the interior: plot(cars, pch = 21, col = "black", bg = "grey").
  6. Add points to an existing plot. points(x, y, pch = 4) uses the same arguments. In a legend, pass the same pch values so the key matches the plot.
  7. Vary the symbol by group. Give pch a vector as long as the data, for example pch = c(1, 2, 3)[as.integer(g)] where g is 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 by cex. At the default cex = 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 pch omits that point; points whose x, y, pch, col or cex is NA are also omitted.
  • pch = NULL (or length 0) falls back to par("pch").

Troubleshooting

  • The fill colour does nothing. bg applies only to symbols 21 to 25. Symbols 15 to 20 take their colour from col.
  • A symbol is missing. Values 26 to 31 are unused and ignored, and NA values are dropped. Check pch for 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; use text() to place labels.
  • Symbols 16 and 19 look different. Both are solid circles, but 19 has a border, so it looks larger when lwd is large relative to cex. 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)

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · free to try

Ask about pch in R: Plot Symbols 0-25, Characters and bg Fill

Ask your first 2 questions free below. Subscribers get 150 a day for $29 a month.

An AI assistant specialized in research administration. It cites the sources behind every answer, labels web answers and says when it can't answer.

Answers draw on CASRAI's guides and dictionary plus the federal and funder documents we index: Federal Register, Grants.gov, Regulations.gov and UKRI.

Works on this site and inside Claude, Cursor and the AI tools you already use.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →