Closed teunbrand closed 4 years ago
It should now be possible to use guide_axis_nested()
as follows:
library(ggh4x)
#> Loading required package: ggplot2
ggplot(pokemon,
aes(weave_factors(name, type1, type2), weight)) +
geom_col() +
scale_x_discrete(guide = "axis_nested")
Created on 2020-04-16 by the reprex package (v0.3.0)
A guide that can deconvolute a call to
interaction(a,b)
and places axis labels hierarchically according to the levels. Similar to whatfacet_nested()
does, but for discrete position scales