position_surround: Surrounds exact overlapping points around the center

Description Usage Arguments Value Examples

View source: R/position-surround.R

Description

Bubble plots sometimes can be hard to interpret, especially if you want to overlay an additional feature. Instead of having to colour one blob with this function you can plot the individuals contributing to the bubble and colour them accordingly.

Usage

1

Arguments

offset

setting offset for x and y axis added to the points surrounding the exact position.

Default is 0.1

Value

ggproto

Examples

1
2
3
4
5
6
7
 library(ggplot2)
 library(ggBubbles)
 data(MusicianInterestsSmall)

 ggplot(data = MusicianInterestsSmall, aes(x = Instrument, y = Genre, col = Level)) +
        geom_point(position = position_surround(), size = 4) +
        scale_colour_manual(values = c("#333333", "#666666", "#999999", "#CCCCCC")) + theme_bw()

ggBubbles documentation built on Sept. 4, 2019, 9:02 a.m.