ggplot(z, aes(x=value, fill=variable)) + geom_histogram(position=position_dodge())
ggplot(z, aes(x=variable, fill=variable, y=value)) + geom_histogram(position="dodge")
Hello,
I have applied the code, which you had sent to Sarita, to my data for a smilar plot I am interested in. I got the following error message.
“X=agedth” is a continuous variable that has values ranging from 18 to 95. “Fill=percent” has data that correspond to x.
Any help will be appreciated.
Thanks,
Pradip
###########################
library("ggplot2")
> ggplot(tempdata, aes(x=agedth, fill=percent)) + geom_histogram(position=position_dodge())
stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.
Error in unit(tic_pos.c, "mm") : 'x' and 'units' must have length > 0
Pradip K. Muhuri, PhD
Statistician
Substance Abuse & Mental Health Services Administration
The Center for Behavioral Health Statistics and Quality
Division of Population Surveys
1 Choke Cherry Road, Room 2-1071
Rockville, MD 20857
Tel: 240-276-1070
Fax: 240-276-1260
e-mail: Pradip...@samhsa.hhs.gov
The Center for Behavioral Health Statistics and Quality your feedback. Please click on the following link to complete a brief customer survey: http://cbhsqsurvey.samhsa.gov
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2