[R] plot custom x axis ticks values

PIKAL Petr petr.pikal at precheza.cz
Thu Feb 14 11:47:40 CET 2013


Hi

much quicker and better for you is to inspect help pages.

?axis

axis(1, at=1:4, labels=c(letters[1:4]))

Regards
Petr



> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of e-letter
> Sent: Thursday, February 14, 2013 11:41 AM
> To: r-help at r-project.org
> Subject: [R] plot custom x axis ticks values
> 
> Readers,
> 
> For this data set:
> 
> testvalues<-c(10,20,30,40)
> 
> How to amend the plot instruction:
> 
> plot(testvalues,ann=FALSE,type='l',yaxt='n',xaxt='n')
> 
> so that x axis ticks labels can be added to existing graph with
> arbitrary value such as 0,100,200,300)?
> 
> Thanks in advance.
> 
> --
> r2151
> 
> ______________________________________________
> 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