[R] How to hide axis interval values in a plot

Marc Schwartz marc_schwartz at comcast.net
Thu Jun 21 20:38:39 CEST 2007


On Thu, 2007-06-21 at 11:07 -0700, spime wrote:
> 
> 
> >plot(cars)
> 
> this shows a plot having interval values of axes (x-axis:5-25;
> y-axis:0-120). I want to hide these values. is there any way?

  plot(cars, axes = FALSE)

If you still want the box around the plot region, follow the above with:

  box()

or use:

  plot(cars, xaxt = "n", yaxt = "n")

See ?plot.default and ?par for more information and standard arguments
for plots.

If you want axes, but using values and tick marks that you define as
opposed to the defaults, see ?axis

HTH,

Marc Schwartz



More information about the R-help mailing list