I'm trying to standardize the aesthetics of my graphics with ggplot2
. I used the theme_set()
function for this. However, when looking closely at the graphics, not all lines have the desired width. In the following MWE, it is observed that the boxes and the horizontal line do not meet the standardization. This situation is also repeated with the lines of geom_smooth()
. How can I solve this?
library(ggplot2)
theme_set(
theme_bw() +
theme(text = element_text(size = 8),
line = element_line(colour = 1, size = 0.12),
rect = element_rect(colour = 1, size = 0.12))
)
ggplot(data = ToothGrowth) +
geom_boxplot(aes(x = supp, y = len)) +
facet_grid(~dose) +
geom_hline(yintercept = 20,
color = "red")
Zooming..