Click into a plot to get the location or identify values
gt_locate( samples = 1, panel = NULL, identify = FALSE, snap = FALSE, raw = FALSE, show = TRUE, ... )
| samples | [ |
|---|---|
| panel | [ |
| identify | [ |
| snap | [ |
| raw | [ |
| show | [ |
| ... | [ |
A tibble of the selected locations and, if identify
= TRUE, the respective values. If show = TRUE the values are also
shown in the plot.
Other geometry tools:
gt_filter(),
gt_pull(),
gt_reflect(),
gt_rotate(),
gt_scale(),
gt_skew(),
gt_stretch(),
gt_translate()
if(dev.interactive()){ # locate coordinates with geoms visualise(geom = gtGeoms$polygon) gt_locate(samples = 2) # locate or identify values with rasters visualise(raster = gtGeoms$grid$continuous) gt_locate(identify = TRUE, snap = TRUE) # with several panels, specify a target visualise(gtGeoms$grid$categorical, gtGeoms$grid$continuous) gt_locate(samples = 4, panel = "categorical", snap = TRUE, identify = TRUE) }