Description Usage Arguments Value Examples
Automatically enclose points in a polygon
1 2 3 |
mapping |
mapping |
data |
data |
stat |
stat |
position |
position |
na.rm |
na.rm |
show.legend |
show.legend |
inherit.aes |
inherit.aes |
... |
dots |
adds a circle around the specified points
1 2 3 4 5 6 7 8 9 10 11 12 | d <- data.frame(x=c(1,1,2),y=c(1,2,2)*100)
gg <- ggplot(d,aes(x,y))
gg <- gg + scale_x_continuous(expand=c(0.5,1))
gg <- gg + scale_y_continuous(expand=c(0.5,1))
gg + geom_spotlight(s_shape=1, expand=0) + geom_point()
gg <- ggplot(mpg, aes(displ, hwy))
ss <- subset(mpg,hwy>29 & displ<3)
gg + geom_spotlight(data=ss, colour="blue", s_shape=.8, expand=0) +
geom_point() + geom_point(data=ss, colour="blue")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.