On 02/14/2013 09:41 PM, e-letter wrote:
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)?
Hi r2151,
If you want the labels to fit on the axis you will have to include this
information in the call to "plot":
plot(testvalues,ann=FALSE,type='l',yaxt='n',xaxt='n',ylim=c(0,300))
axis(2,at=c(0,100,200,300))
As you may be adding more values after the first set, the same goes for
the X axis if there are different numbers of Y values.
Jim
______________________________________________
R-help@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.