I'd like to create a script specific theme for some ggplots I'm producing. I plan to have a set custom theme that allows me to make some adjustments if needed using the three-dot notation ...
. Something like this.
theme_script <- theme(text = element_text(color = 'black'),
panel.background = element_blank(),
axis.line.x = element_line(color = 'black'),
axis.ticks = element_blank(),
plot.margin = margin(.5, .5, .5, .5, 'cm'), ...) # dot notation
Then I could use thescript_theme
for things like.
plot +
theme_script(text = element_text(size = 25))
But I'm getting this message Error: '...' used in an incorrect context
. Is there a better approach to accomplishing my goal?