"Rishi Ganti" <[EMAIL PROTECTED]> writes: > Thanks, but even with axis() I can't get the x-axis to extend to the sides. > > Try, e.g., > > x = rnorm(1000) > > you should have some values in excess of 3 (or below -3). > > I want to draw the x-axis from -4 to 4, thus encapsulating all points. > > axis(1,-4:4) > > but it won't draw. It TRIES to draw it, but I don't see a -4 or 4 on the plot.
Well, the x limits likely don't extend that far. (You have noticed by now that the axis extents are not the same as the sides of the bounding box, right?) So set them: hist(x,xlim=c(-4,4)) Or generically: hist(x,xlim=range(pretty(x))) tends to give the kind of external axis that you're requesting. Less efficient use of space though (since the axis is always longer than it needed to be). -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html