Skip to content
Back to formatted view

Raw Message

Message-ID: <1078083600.7704.23.camel@localhost.localdomain>
Date: 2004-02-29T19:40:00Z
From: Marc Schwartz
Subject: stripchart and axes
In-Reply-To: <6.0.3.0.0.20040228164316.0461b348@10.0.10.66>

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