[R] Gap between graph and axis

Bill.Venables at csiro.au Bill.Venables at csiro.au
Tue Nov 23 01:52:29 CET 2010


perhaps you need something like this.

par(yaxs = "i")
plot(runif(10), type = "h", ylim = c(0, 1.1))

 

-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Sebastian Rudnick
Sent: Tuesday, 23 November 2010 10:37 AM
To: r-help at r-project.org
Subject: [R] Gap between graph and axis

Hi everyone!

I want to plot some precipitation data via plot(type="h"). Unfortunately there
is always a gap between the bars and the x-axis, so that the bars reach in the
"negative area" below 0 at the y-axis, which is very misleading. The
ylim-parameter is set to 0 and max of precipitation, the min value of
precipitation is 0 as well.
I tried to fix this via the fig parameter, but I have no idea how to do it at
all. 
I hope anyone can help.

Thanks a lot,

Sebastian

______________________________________________
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