[R] Setting x-axis labels in plot()

Uwe Ligges ligges at statistik.uni-dortmund.de
Fri Feb 11 13:15:44 CET 2005


michael watson (IAH-C) wrote:

> Hi
>  
> This draws the (kind of) plot I want:
>  
> plot(InsectSprays[,2:1])
>  
> But how do I make it label the x-axis with A, B, C, D etc instead of 1:6?

Set xaxt="n" in your call to plot and add the axis() separately 
specifying the labels.

Uwe Ligges

> Mick
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html




More information about the R-help mailing list