[R] replacing default axis labels on a plot

Duncan Murdoch murdoch at stats.uwo.ca
Thu May 14 14:12:17 CEST 2009


On 14/05/2009 7:31 AM, Graves, Gregory wrote:
> I have 3 columns:  flow, month, and monthname, where month is 1-12, and
> monthname is name of month.  I can't get the plot to replace the 1-12
> with monthname using ticks.lab.  What am I doing wrong?
> 
> plot(flow~factor(month),xlab="Month",ylab="Total Flow per Month",
> ylim=c(0,55000), ticks.lab="monthname")

ticks.lab is not a parameter to the plot.formula function.  You don't 
say where you found it described, but I'd suggest you read your source 
more closely, or just use xaxt="n" in the plot call, and construct your 
own call to axis(), e.g. axis(1, at=1:12, labels=monthname).

Duncan Murdoch

> 
> Thanks
> 
> Gregory A. Graves
> Lead Scientist
> REstoration COoordination and VERification (RECOVER) 
> Watershed Division
> South Florida Water Management District
> Phones:  DESK: 561 / 682 - 2429 
>              CELL:  561 / 719 - 8157
>              
>  
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.




More information about the R-help mailing list