[R] stripchart and axes

Marc Schwartz MSchwartz at medanalytics.com
Sun Feb 29 20:40:00 CET 2004


On Sun, 2004-02-29 at 12:32, Henric Nilsson wrote:
> 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?


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




More information about the R-help mailing list