Written and maintained by CASRAI Editorial Board
Last updated
A stripchart in R is drawn with the stripchart() function, which plots every observation as a point along a single axis, one strip per group. The R manual describes these as one-dimensional scatter plots (dot plots), and notes that these plots are a good alternative to boxplots when sample sizes are small. The main decision is how to handle points that share the same value: method = "overplot", "jitter" or "stack".
What a stripchart is used for in research
A stripchart shows the raw data rather than a summary. Each value is one point, so a reader can see group sizes, gaps and outliers directly. That is why the R manual points to it as an alternative to boxplots for small samples: a box and whiskers built from a handful of observations hides how few observations there are. For the boxplot side of the comparison, see the CASRAI guide to box plots in R; for two numeric variables, see scatterplots in R.
Install or access
stripchart() is documented in the graphics package of the R manual. Once R is running, ?stripchart opens its help page. The ggplot2 alternative in the table below is a separate package; the ggplot2 home page gives these install commands:
install.packages("ggplot2")
# or the whole collection
install.packages("tidyverse")
Step-by-step: drawing a stripchart
The default method has this usage in the R manual:
stripchart(x, method = "overplot", jitter = 0.1, offset = 1/3,
vertical = FALSE, group.names, add = FALSE, at = NULL,
xlim = NULL, ylim = NULL, ylab = NULL, xlab = NULL,
dlab = "", glab = "", log = "", pch = 0,
col = par("fg"), cex = par("cex"), axes = TRUE,
frame.plot = axes, ...)
- Pass the data.
xcan be a numeric vector or a list of numeric vectors, one strip per list element. With a single vector you get one strip:stripchart(x). - Group with a formula. A formula
y ~ ggroups the numeric variableyby the factorg. This example is adapted from the manual:stripchart(decrease ~ treatment, data = OrchardSprays), whereOrchardSpraysis one of R’s built-in datasets. (Data frames are covered in data frames in R.) - Choose the orientation. The default is
vertical = FALSE, so values run along the horizontal axis. Setvertical = TRUEto draw vertical strips. The manual’s own example isstripchart(decrease ~ treatment, main = "stripchart(OrchardSprays)", vertical = TRUE, log = "y", data = OrchardSprays), which also puts the data axis on a log scale. - Separate tied points. Add
method = "jitter"ormethod = "stack"(see the next section). - Label the axes. Use
xlabandylab, ordlabandglabfor the data axis and group axis. The manual saysdlabandglabare used whenxlaborylabare not given. - Add to an existing plot if needed.
add = TRUEdraws on the current plot, andatsets where the strip goes; it defaults to1:nforngroups. The manual’s example adds a stacked strip at position 1.2:x <- rnorm(50); xr <- round(x, 1); stripchart(xr, method = "stack", add = TRUE, at = 1.2).
Which method for tied values: overplot, jitter or stack
The method decides what happens when several observations have the same or nearly the same value. The manual lists three:
| Method | What it does | Setting and default | Note from the manual |
|---|---|---|---|
"overplot" |
Draws points on top of each other | Default method | Coincident points overlap |
"jitter" |
Adds random displacement so coincident points separate | jitter = 0.1 |
Separates coincident points |
"stack" |
Stacks coincident points into a pile | offset = 1/3, the spacing between stacked points in line heights |
The manual says stacking only makes sense for very granular data |
“Very granular data” means values with many repeats, such as measurements rounded to one decimal. That is why the manual’s stacking example rounds the random normal values with round(x, 1) before stacking. On continuous values with no ties, stacking has nothing to pile up.
Output and how to read it
- Every point is one observation. A stripchart does not draw medians, quartiles or means. What you see is the raw data, so the number of points per strip is the group size (with overplot, tied values hide each other, so count with jitter or stack).
- Read position along the data axis only. The data axis is horizontal by default (X) and vertical when
vertical = TRUE. Jitter exists to separate coincident points, so the small displacement it adds is not data; do not read it as a difference between observations. - Compare strips by position and spread. Check where each group sits on the data axis, how widely the points spread, and whether any single points lie far from the rest.
Troubleshooting
Points hide each other
The default method = "overplot" draws tied values at the same spot. Switch to method = "jitter", and if the strips still look crowded, raise the jitter amount from its default of 0.1.
Stacked points look wrong or do nothing
Stacking is meant for very granular data. If your values are continuous with few repeats, use "jitter" instead, or round the values first as the manual’s example does.
Axis labels are blank or on the wrong axis
dlab labels the data axis and glab labels the group axis. The data axis is X unless vertical = TRUE, so set the label to match the orientation you chose.
Groups are in an unexpected order or position
Groups are placed at at = 1:n by default. Set at explicitly to place strips where you want them.
Free alternatives
Base R’s stripchart() and the ggplot2 function geom_jitter() both draw jittered one-dimensional dot plots, and both are free and open source. The ggplot2 reference describes geom_jitter() as adding a small amount of random variation to the location of each point, and as a shortcut for geom_point(position = "jitter"). A matching call for the manual’s example is ggplot(OrchardSprays, aes(treatment, decrease)) + geom_jitter(width = 0.2). For more on the ggplot2 system, see ggplots in R.
| Feature | Base R stripchart() |
ggplot2 geom_jitter() |
|---|---|---|
| Where it comes from | graphics package, R manual | ggplot2 package, installed with install.packages("ggplot2") |
| How jitter is set | method = "jitter" with jitter = 0.1 (amount) |
width and height, both NULL by default |
| Default amount | 0.1 | 40% of the resolution of the data when omitted |
| What the number means | Amount of jitter | The jitter is added in both positive and negative directions, so the total spread is twice the value specified |
| Caution with categories | Strips sit at at = 1:n |
Categorical data are aligned on integers, so a width or height of 0.5 makes the categories indistinguishable |
If you want the plot to carry an extra variable or to join a longer ggplot2 workflow, geom_jitter() is the natural route. If you just need a quick look at raw values per group, stripchart() is a single call. Line width and styling arguments for base graphics are covered in lwd in R.
FAQ
What is a stripchart in R?
It is a one-dimensional scatter plot (dot plot) drawn by stripchart(): one point per observation along a single axis, with one strip per group.
When should I use a stripchart instead of a boxplot?
The R manual calls stripcharts a good alternative to boxplots when sample sizes are small; every observation stays visible, so group size is obvious.
How do I make the strips vertical?
Set vertical = TRUE. The default is FALSE.
How do I stop points from overlapping?
Use method = "jitter" to add random displacement, or method = "stack" for very granular data.
How do I group a stripchart by a factor?
Pass a formula such as y ~ g, with data = naming the data frame.
How do I draw a stripchart in ggplot2?
Use geom_jitter(), which is a shortcut for geom_point(position = "jitter").
Sources
- R Documentation, stripchart {graphics} (R-devel manual), checked 2026-10-29.
- ggplot2 reference, geom_jitter, checked 2026-10-29.
- ggplot2 home page, ggplot2.tidyverse.org, checked 2026-10-29.







