[R] Changing the position of the origin

Thomas Petzoldt thpe at simecol.de
Tue Nov 18 08:17:43 CET 2008

Plantky wrote:
> 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

Does this what you want?

x <-  runif(10)
y <- -runif(10)

plot(x, y, xlim=c(0, max(x)), ylim=c(min(y), 0), axes=FALSE)

Thomas P.

More information about the R-help mailing list