Created
July 23, 2019 14:39
-
-
Save trinker/b0ad19a95222706d3c9687d45b732d36 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
library(gridExtra) | |
plot1 <- ggplot(mtcars, aes(x = hp)) + | |
geom_histogram(bins = 10) + | |
labs( | |
y = 'Count of Awesomeness', | |
title = 'Count Histogram' | |
) | |
plot2 <- ggplot(mtcars, aes(x = hp)) + | |
geom_histogram(bins = 10, aes(y = stat(width*density))) + | |
scale_y_continuous(labels = numform::f_pp) + | |
labs( | |
y = 'Percentage Awesomeness', | |
title = 'Percentage Histogram' | |
) | |
grid.arrange(plot1, plot2, ncol = 1) |
Author
trinker
commented
Jul 23, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment