[R] Newbie Question About Setting Plot Axis Limits
andrew
andrewjohnroyal at gmail.com
Thu Sep 24 02:06:23 CEST 2009
This is not a complete answer, but try the following in order
plot(c(1,1), ylim=c(0, 15), xlim=c(0, 13), axes = FALSE)
axis(1)
axis(2)
box()
If you want lines, use abline. Hacking something together can be done
with these commands.
On Sep 24, 9:36 am, Jason Rupert <jasonkrup... at yahoo.com> wrote:
> Using the following: plot(c(1,1), ylim=c(0, 15), xlim=c(0, 13))
>
> However, it produces the following:http://n2.nabble.com/Simple-Plot-Axis-Limits-Question-td3703091.html
>
> This is not what I expected because I would have expected the origin to be (0, 0), but on the plot it looks a little different on the plot.
>
> The y axis also appears to extend a little beyond 15. Is there some way to have the plot command respect the requested ylim and xlim settings?
>
> Thanks again for any insight.
>
> ______________________________________________
> R-h... at r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list