Estoy intentando personalizar una gráfica en Rstudio pero no me deja ampliar el tamaño de las cajas con texto de cada grid generado por facet_grid:
dev.off()
library(showtext)
showtext_auto()
theme_set(theme_void(base_family = "Bebas Neue")) # Definir tema base
theme_update(
text=element_text(family="Helvetica", size=13),
strip.background = element_rect(
color="black", fill="#e2ecf1", size=1.5, linetype="solid"),
strip.text.x = element_text(
size = 13, color = "black", face = "bold"),
strip.text.y = element_text(
size = 13, color = "black", face = "bold"),
panel.background = element_rect(fill = "white",
colour = "black",
size = 0.5, linetype = "solid"),
panel.grid.major = element_line(size = 0.1, linetype = 'dotted',
colour = "lightgrey"),
legend.position = "top",
legend.key.width = unit(1.65,"cm"),
legend.title = element_blank(),
legend.text =element_text(
size = 13, color = "black", face = "bold"))
library(harrypotter)
ggplot(values.graph2, aes(x = tiempo, y = mean),color = tiempo) +
geom_col(aes(fill = tiempo), alpha = 1)+
scale_fill_hp_d(option = "Ravenclaw", name = "Clarity") +
facet_grid(Tipo_mutación~Var, scales = "free")+
scale_y_continuous(expand = expansion(mult = c(0, 0.2)),
breaks = seq(0,100, by = 20),
limits = c(0, 100)) +
geom_errorbar(aes(ymin=mean-sd, ymax=mean+sd), width=.2,
position=position_dodge(.9)) +
geom_text(aes(label = sprintf("%0.1f",round(mean,digits = 1))), size = 6,
position = position_dodge(0.85), vjust = -0.5)+
geom_hline(yintercept = 0, colour="black", linetype = "solid",size=0.5)
Obteniendo este gráfico:
Como podeis ver, donde aparece IMC % number of cycles atb, etc... no aparece con suficiente espacio. ¿Cómo puedo ampliarlo?