You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
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
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()
The text was updated successfully, but these errors were encountered: