[R] Changing the position of the origin
Kang Min
ngokangmin at gmail.com
Tue Nov 18 07:26:53 CET 2008
Hi Daniel,
I'm sorry I wasn't clear. All my values are positive, and I'm plotting
the map of a rectangular plot. I have all the x and y values of
individual points, but the 0,0 point is at the top left hand corner of
the plot. I have no problems plotting it with the 0,0 at the lower left
hand corner, but how can I plot the map with 0,0 starting from the top
left hand? If possible I don't want to have to make all my y-values
negative.
Thanks,
Kang Min
Daniel Malter wrote:
> Hi, I don't understand the question. If your data is in the fourth quadrant
> (all positive Xs, all negative Ys) this will happen automatically as the
> standard R plot plots only in the range where there is data, e.g.
>
> x=rnorm(100,0,1)
> e=rnorm(100,0,1)
> y=-abs(x)-abs(e)
> plot(y~x,bty="n")
>
> Please be more precise about your question.
>
> Cheers,
> Daniel
>
> -------------------------
> cuncta stricte discussurus
> -------------------------
>
> -----Ursprüngliche Nachricht-----
> Von: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] Im
> Auftrag von Plantky
> Gesendet: Monday, November 17, 2008 11:46 PM
> An: r-help at r-project.org
> Betreff: [R] Changing the position of the origin
>
> Hi all,
>
> Can anyone tell me how I can make 0,0 start at the top left hand corner of a
> graph, instead of the typical lower left hand corner? I've tried to plot
> with axes=F and then putting on the axes later, but I want the points to
> correspond to the axes.
>
> Thanks,
> Kang Min
>
> ______________________________________________
> 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