I recently created some graphs in R ggplot, everything works fine except my code that is bit messy since that for each graph im using this styling
theme(
axis.text.x = element_text(size = 8),
axis.text.y = element_text(size = 8),
axis.title.x = element_blank(),
axis.title.y = element_text(size = 11),
legend.position = "bottom",
legend.title = element_blank(),
legend.text = element_text(size=9),
legend.spacing.x = unit(0.25, 'cm'),
axis.text.y.right = element_text(hjust = 0),
plot.title = element_text(size = 15, hjust = 0.5)
)
Is it possible to recreate this piece of code as function that I can apply for each graph?
mythemeand dop + mytheme? I don't know why you need a function.