[R] barplot: invalid 'xlim' value

David Winsemius dwinsemius at comcast.net
Sun May 16 00:43:23 CEST 2010

On May 15, 2010, at 2:12 PM, emorway wrote:

> Josh,
> Thanks for looking into this further.  Picking up on your hint I  
> tried to
> coerce the xlim values as well:
> barplot(coldat,horiz=TRUE,axes=FALSE,xlim=c(as.numeric(strptime(well. 
> 80.2$date[1],"%m/%d/%Y
> %H:%M")),as.numeric(strptime(well.80.2$date[length(well. 
> 80.2$date)],"%m/%d/%Y
> %H:%M"))),ylim=ylim,col=8,space=0)
> It doesn't complain at this point, but it doesn't appear to do  
> anything
> either.  Hopefully someone else will spot the problem.

I am having trouble figuring out what you expect. If you already have  
a plot and you are using par(add=TRUE) then the x and y limits are  
already fixed. Furthermore you are asking for a horizontal barplot,  
which does add to the xisting plot when you remove both the xim and  
ylim parameters. Whether it makes any sense to do it that way, you  
will need to evaluate yourself, giving the lack of "motivation" in  
your delivery. It does not appear that the author of the example you  
cite used xlim or ylim in his modified boxplot function.

> Eric
> -- 
> View this message in context: http://r.789695.n4.nabble.com/barplot-invalid-xlim-value-tp2217919p2218029.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> 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