[R] new newbie graphics question
ligges at amadeus.statistik.uni-dortmund.de
Sat Sep 1 23:21:18 CEST 2001
Myriam Abramson wrote:
> > > For example, I haven't been able to rescale the axes properly.
> > > I have 30 data points but I want the x-axis to read from 0 to 3000.
> > > How is that done? What I've tried from looking at the ?axis
> > > documentation does not work and then my y-axis is messed up.
> > Try
> > plot(..., xlim=c(0, 3000))
> Sorry, that does not work. the data is now scaled from 0 to 30
> although the labels are correct.
If you want points to appear at a certain position (x, y) in the plot,
just specify x and y! I assume you only specified the y locations of the
To plot your 30 points equidistant between 0 and 3000, you can try
plot(seq(0, 3000, 100), y)
Please read "An Introduction to R". It is a really nice introduction to
make your first steps in R and learn much about it.
Having read "Section 12: Graphical procedures" you would have known how
to solve your problem, I think.
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
More information about the R-help