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

hbar: for char y_var NA bars are at the top #34

Open
davidhodge931 opened this issue Jul 8, 2020 · 1 comment
Open

hbar: for char y_var NA bars are at the top #34

davidhodge931 opened this issue Jul 8, 2020 · 1 comment

Comments

@davidhodge931
Copy link
Contributor

library(dplyr)
library(ggplot2)

plot_data <- iris %>%
group_by(Species) %>%
summarise(Petal.Length = mean(Petal.Length)) %>%
add_row(Species = "New species") %>%
mutate(Species = forcats::fct_reorder(Species, Petal.Length))

ggplot(subset(plot_data, !is.na(Petal.Length))) +
geom_col(aes(Species, Petal.Length)) +
geom_col(aes(Species, Petal.Length), data = subset(plot_data, is.na(Petal.Length))) +
coord_flip()

@davidhodge931 davidhodge931 changed the title hbar_col puts NA bars at the top of a graph geom_col puts NA bars at the top of a horizontal bar graph Aug 11, 2020
@davidhodge931
Copy link
Contributor Author

tidyverse/forcats#266

@davidhodge931 davidhodge931 changed the title geom_col puts NA bars at the top of a horizontal bar graph hbar: fix geom_col putting NA bars at top for character y_var Oct 18, 2020
@davidhodge931 davidhodge931 changed the title hbar: fix geom_col putting NA bars at top for character y_var ggplot_hbar family: NA bars are at the top for character y_var Apr 28, 2021
@davidhodge931 davidhodge931 changed the title ggplot_hbar family: NA bars are at the top for character y_var ggplot_hbar family: for char y_var, put NA bars at the bottom Apr 28, 2021
@davidhodge931 davidhodge931 changed the title ggplot_hbar family: for char y_var, put NA bars at the bottom hbar: for char y_var NA bars are at the top Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant