Re: [R] Barplot w/ single stacked bar

From: hadley wickham <>
Date: Thu, 24 Jan 2008 19:45:29 -0500

> I can reach my goal in ggplot2, although the relative heights of the
> bar's pieces don't seem quite right (it does generate a warning):
> library(ggplot2)
> x<-factor(1)
> y<-factor( c("Male","Male","Female") )
> mydata <- data.frame(x,y)
> rm(x,y)
> mydata

Ooops! There was a bug in stat_bin that occurred when there was a single categorical x value. It'll be fixed in the next version.



______________________________________________ mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.
Received on Fri 25 Jan 2008 - 00:50:28 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 25 Jan 2008 - 01:30:08 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive