Skip to content
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

Quick histograms in ggplot2 #31

Open
Aariq opened this issue Apr 4, 2022 · 1 comment
Open

Quick histograms in ggplot2 #31

Aariq opened this issue Apr 4, 2022 · 1 comment

Comments

@Aariq
Copy link

Aariq commented Apr 4, 2022

> ggplot(dn) + geom_histogram(aes(Nile),dn)

For a simple, quick histogram without any tweaks I'd go with qplot(Nile). If you keep the geom_histogram() example in, there's a mistake. Should be: ggplot(dn) + geom_histogram(aes(Nile)) without the dn in geom_histogram()

library(ggplot2)
qplot(Nile)
#> Don't know how to automatically pick scale for object of type ts. Defaulting to continuous.
#> `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

Created on 2022-04-04 by the reprex package (v2.0.1)

@matloff
Copy link
Owner

matloff commented Mar 11, 2023

Right. In my essay, I say: "(Things would be simpler for Tidy instructors if they were to use
qplot() in the ggplot2 package, but as far as I know, few if any Tidy courses do this.)" Actually, this is a part of the Tidy story that still mystifies me; why don't they use qplot()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants