Description Usage Arguments Value Author(s) Examples
Locator for ggplots. (Note : only accurate when extent = "normal" when using ggmap.)
1 |
n |
number of points to locate. |
message |
turn messaging from grid.ls on/off |
xexpand |
expand argument in scale_x_continuous |
yexpand |
expand argument in scale_y_continuous |
a data frame with columns according to the x and y aesthetics
Tyler Rinker with help from Baptiste Auguie and StackOverflow user DWin with additions and canning by David Kahle david.kahle@gmail.com. Updated by \@Nikolai-Hlubek
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | if(interactive()){
# only run for interactive sessions
df <- expand.grid(x = 0:-5, y = 0:-5)
(p <- qplot(x, y, data = df) +
annotate(geom = 'point', x = -2, y = -2, colour = 'red'))
gglocator()
p +
scale_x_continuous(expand = c(0,0)) +
scale_y_continuous(expand = c(0,0))
gglocator(1, xexpand = c(0,0), yexpand = c(0,0))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.