I'm new to RStudio and have made great progress so far, in no small part thanks to this forum. I haven't found (or recognised) an answer to this, hence the question.
I see that a ggplot call can be built up like this
p <- ggplot(df_sc_t5_zoom, aes(x = date_notified, y = value))
p + geom_line(aes(color = variable)) + theme_light()
p + facet_wrap(~ variable, ncol=1, scales = "free_y")
# Then call the plot by
p
Is it possible to define the settings first and add them to a ggplot call later?
This doesn't work but illustrates what I mean.
pls <- geom_line(aes(color = variable)) + theme_light()
pls + facet_wrap(~ variable, ncol=1, scales = "free_y")
# other things happen...
# Then call the plot by
ggplot(df_sc_t5_zoom, aes(x = date_notified, y = value)) + pls
Thanks in advance
Michael