79138373

Date: 2024-10-29 17:45:21
Score: 0.5
Natty:
Report link

From @Axeman comment:

ggplot(mtcars, aes(x = mpg, y = disp, color = carb, shape = as.factor(am), size = vs, fill = cyl)) +
  geom_point() +
  guides(color = guide_colorbar(theme = theme(legend.title = element_text(size = 4, color = "red"))),
         shape = guide_legend(theme = theme(legend.title = element_text(size = 8, color = "green"))),
         size   = guide_legend(theme = theme(legend.title = element_text(size = 12, color = "yellow"))),
         fill = guide_legend(theme = theme(legend.title = element_text(size = 16, color = "orange")))
                       

)

and here is the official documentation: https://ggplot2.tidyverse.org/reference/guide_legend.html

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Axeman
  • Self-answer (0.5):
  • High reputation (-1):
Posted by: MLEN