[R] xlim=c(min(x), max(x)) still produces extra margin on both sides of x axis in plot()

madr madrazel at interia.pl
Mon Nov 22 11:04:50 CET 2010


code:
op <-
par(bg='black',fg='gray',col='gray',col.axis='gray',col.lab='gray',col.main='gray',col.sub='gray',mai=c(0,0,0,0),
tck = 0.01, mgp = c(0, -1.4, 0), mar=c(0,0,0,0))
plot(x,y,ylim=c(-20,20),xlim=c(min(x),max(x)),pch='X',col = rgb(1,1,1,
0.5),yaxt="n", ann=FALSE)
abline(v=c(min(x),max(x)), lty=3, col="yellow")
par <- op

render:
http://i51.tinypic.com/2rz9w0h.png

So what I mean is the area between yellow lines and edges of the plotting
area, so min(x) and max(x) would be really on the edge of the plot.
-- 
View this message in context: http://r.789695.n4.nabble.com/xlim-c-min-x-max-x-still-produces-extra-margin-on-both-sides-of-x-axis-in-plot-tp3053356p3053356.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list