Subtitles ggplot2

2

I have this graph created by the geom_bar () function:

Iwouldliketoseparatethetwoboxeswheretheyareplottedtofill,asfollows:

How do I do this? which parameter of the theme () function can I use to solve this problem?

    
asked by anonymous 21.09.2018 / 03:52

1 answer

1

The legend.key.size attribute changes the distance between the elements a little. See if it suits you:

library(ggplot2)
ggplot(iris, aes(x = Sepal.Length, y = Petal.Length, color = Species)) +
  geom_point() +
  theme(
    legend.key.size = unit(3, 'lines')
    )

Here the reference in English.

    
22.09.2018 / 18:54