Skip to content

stripchart and axes

2 messages · Henric Nilsson, Marc Schwartz

#
Hi,

I'd like to remove the axes from a plot produced by stripchart(). However, 
when trying stripchart(..., axes = FALSE), I get the error meassage

Error in stripchart(hypokvot1 ~ treatment, "jitter", pch = 1, vert = TRUE,  :
	unused argument(s) (axes ...)

using R 1.8.1 on Windows. Can it be done some other way? If not, maybe this 
functionality can be added to a future version of R?

//Henric
#
On Sun, 2004-02-29 at 12:32, Henric Nilsson wrote:
stripchart() will not honor that argument, which is why you are getting
the error.

Try calling the following before calling stripchart():

 par(yaxt = "n", xaxt = "n", bty = "n")

This will result in the axes being suppressed and no surrounding box.

Example:

# Save parameters to restore them after the plot
old.par <- par(no.readonly = TRUE)

x <- rnorm(50)
par(yaxt = "n", xaxt = "n", bty = "n")
stripchart(x)

# Restore the pars back to initial settings
par(old.par)

See ?par for more information on the above graphic parameters.

HTH,

Marc Schwartz