Open aaronw22 opened 2 months ago
Describe the bug Ordered factor is ignored when the facets are arranged when plot_label() is used to add plot labels.
plot_label()
Code to reproduce
library(ggplot2) library(theme61) df <- data.frame(grp = 1:3, val = rep(1, 3)) df$grp <- ordered(df$grp, 3:1) # this works ggplot(df, aes(x = val, y = val)) + geom_point() + facet_wrap(~grp) # this resets the order ggplot(df, aes(x = val, y = val)) + geom_point() + facet_wrap(~grp) + plot_label("a point", 1.25, 1, facet_name = "grp", facet_value = "1") + scale_x_continuous_e61(c(1, 2))
Expected behavior Facet order follows the ordered factor that is the input vector.
Describe the bug Ordered factor is ignored when the facets are arranged when
plot_label()
is used to add plot labels.Code to reproduce
Expected behavior Facet order follows the ordered factor that is the input vector.