I have a large dataset for which I have multiple plots. I understand that using facets is recommended but my audience prefers multiple ranges in the same plot area. I have up to 7 different variables/ranges in the same plot - indicated by type
in the below code snippet.
I have some parameters that remain unchanged for all plots (after the initial ggplot statement ggplot(dat, aes(x = loc_time, y = <variable_name>)
:
geom_point(aes(shape = type, color = type, fill = type)) +
scale_shape_manual(values = c(21,22,23,25,15,17,16)) +
scale_fill_manual(values = c('#e41a1c','#377eb8','#4daf4a','#984ea3', '#ff7f00','#a65628','#f781bf','black')) +
scale_color_manual(values = c('#e41a1c','#377eb8','#4daf4a','#984ea3', '#ff7f00','#a65628','#f781bf','black')) +
scale_size_manual(values = c(1,2,2,1,2,2,1)) +
geom_line(aes(color = type))
xlab("Local Time")
I could copy paste this info. to all plot statements but was wondering if there's a way to declare this just once.
I found this post Reset the graphical parameters back to default values without use of dev.off() but it doesn't quite answer my question.