Any suggestions on how to align text of the levels within a variable closer to the variable name? I am plotting model coefficients using the package GGally and broom.mixed which automatically incorporates faceting based on the covariates I'm interested in. I found strip.text.y.left(element.text = hjust = 1)
to get me the closest, but I'm trying to eliminate the award space between labels to make more room for the actual graph.
require(broom.helpers)
require(broom.mixed)
require(GGally)
# model4 is my glmer model
ggcoef_model(model4, conf.int = TRUE, include = c("Openness","Slope^2","Distance to trails and rec","Dom.Veg",
"Northness","Burn","Distance to roads"), intercept = FALSE,
add_reference_rows = FALSE, show_p_values = FALSE, signif_stars = FALSE, stripped_rows=FALSE,
point_size=3, errorbar_height = 0.2) +
xlab("Coefficients") +
theme(plot.title = element_text(hjust = 0.5, face="bold", size = 24), strip.text.y = element_text(size = 17),
strip.text.y.left = element_text(hjust = 1), strip.placement = "outside",
axis.title.x = element_text(size=17, vjust = 0.3), legend.position = "right",
axis.text=element_text(size=15.5, hjust = 1),
legend.text = element_text(size=14))
Ideally, I think labels with an inside placement would look best but that might cause issues for the Dom.Veg category as the main variable title should come before it's levels. Another good option would be an outside placement with left-aligned variable names (so remove the strip.text.y.left(element.text = hjust = 1)
line, and have the categories be much closer to the variable names. Is this even possible?