I would like to make the border of my plots a specific color other than black. I notice that if I set the default theme themeww () using:
theme_set(theme_bw())
that I can set the border with the color that I want to use
theme(panel.border = element_rect(color="darkred", size=0.5, linetype="solid").
It seems to work. The border of each panel, whether it is a faceted plot or a single plot, takes a βdarkβ color, and the rest of the graph is the same as before I changed the panel.
However, if I use a different default theme, such as theme_gray () or theme_classic (), the border changes, but the contents of each of the facets are destroyed (completely white).
Any idea what causes this difference in behavior or what can I do to fix this? I would like to use theme_gray () and place a thin colored line around the border of each face.
source share