Legend

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

library(ggplot2)
library(ggx)

Legend

Remove the legend alltogether:

ggplot(data=iris,
       mapping=aes(x=Sepal.Length,
                   y=Petal.Length, color=Species))+
  ggtitle("Iris")+
  geom_point()+
  gg_("remove legend")

Change legend font size:

ggplot(data=iris,
       mapping=aes(x=Sepal.Length,
                   y=Petal.Length, color=Species))+
  ggtitle("Iris")+
  geom_point()+
  gg_("set font size of legend title to 40")


Try the ggx package in your browser

Any scripts or data that you put into this service are public.

ggx documentation built on Jan. 22, 2021, 5:09 p.m.