Closed vermouthmjl closed 7 years ago
Here is an example.
library(ggsn) library(ggplot2) levls = c("A", "B", "C") tmp_data= expand.grid(type = levls, long = 1:10) tmp_data$lat = runif(10) tmp_data$type = factor(tmp_data$type, levels = levls[c(2,1,3)]) g = ggplot(data = tmp_data, aes(x = long, y = lat)) + facet_grid(.~type) + geom_point() g g + scalebar(data = tmp_data, location = "topright", facet.var = "type", facet.lev = "B", dd2km = FALSE,dist = 0.1)
I'd like to be able to conserve a specific order for the levels in the facetting variable. However, using scalebar seems to rearrange them into alphabetical order.
Check the version 0.4.4.
library(devtools) install_github("oswaldosantos/ggsn")
Great! Thanks. I'll close the issue.
Here is an example.
I'd like to be able to conserve a specific order for the levels in the facetting variable. However, using scalebar seems to rearrange them into alphabetical order.