-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New error about continuous/discrete x comes up with geom_histogram() in ggplot2 2.0 #1465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Use |
@has2k1 That worked. I'm still curious why |
Previously |
Thanks for the explanation. |
Same problem here and solved it based on this explanation. Thanks. |
What's the canonical way to plot proportions right now? |
Ok, figured it out. |
geom_bar is really working.... great solution |
Thanks using geam_bar() worked fine |
This worked for me as well. Thanks |
geom_bar() helped me as well. |
Why does it think my data is discrete and not continuous? |
@kgeier it's impossible to tell without more information. Could you please include self-contained reprex (short for minimal reproducible example) in a question at https://community.rstudio.com/, or (if you're confident it's a bug in ggplot2) a new issue? If you've never heard of a reprex before, you might want to start by reading the tidyverse.org help page. The reprex dos and don'ts are also useful. |
@batpigandme |
by using geom_bar it give me this error |
@risved7 Was the data summarized? |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Here is minimal reproducible code to demonstrate my problem:
This code used to run fine, but after updating to ggplot2 it gives the following error:
Error: StatBin requires a continuous x variable the x variable is discrete. Perhaps you want stat="count"?
I thought "this is new", but I tried adding
stat = "count"
anyway:Which gives me this error:
Error: Unknown parameters: binwidth, bins, origin, right
Okay, I tried to specify them myself:
But it gives me the same error:
Error: Unknown parameters: binwidth, bins, origin, right
I've confirmed that the
days
variable is a factor (and my old code used to work with that before):Any tips on what I'm doing wrong or what's going wrong? I tried looking at earlier issues and at
?geom_histogram
.The text was updated successfully, but these errors were encountered: