-
Notifications
You must be signed in to change notification settings - Fork 73
/
geom_density_2d_interactive.R
52 lines (47 loc) · 1.53 KB
/
geom_density_2d_interactive.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#' @title Create interactive contours of a 2d density estimate
#'
#' @description
#' The geometries are based on [geom_density_2d()] and [geom_density_2d_filled()].
#' See the documentation for those functions for more details.
#'
#' @param ... arguments passed to base function,
#' plus any of the [interactive_parameters].
#' @inheritSection interactive_parameters Details for interactive geom functions
#' @examples
#' # add interactive contours to a ggplot -------
#' @example examples/geom_density_2d_interactive.R
#' @seealso [girafe()]
#' @export
geom_density_2d_interactive <- function(...)
layer_interactive(geom_density_2d, ...)
#' @export
#' @rdname geom_density_2d_interactive
#' @usage NULL
geom_density2d_interactive <- geom_density_2d_interactive
#' @rdname ggiraph-ggproto
#' @format NULL
#' @usage NULL
#' @export
GeomInteractiveDensity2d <- ggproto(
"GeomInteractiveDensity2d",
GeomInteractivePath,
default_aes = add_default_interactive_aes(GeomDensity2d),
parameters = interactive_geom_parameters
)
#' @rdname geom_density_2d_interactive
#' @export
geom_density_2d_filled_interactive <- function(...)
layer_interactive(geom_density_2d_filled, ...)
#' @export
#' @rdname geom_density_2d_interactive
#' @usage NULL
geom_density2d_filled_interactive <- geom_density_2d_filled_interactive
#' @rdname ggiraph-ggproto
#' @format NULL
#' @usage NULL
#' @export
GeomInteractiveDensity2dFilled <- ggproto(
"GeomInteractiveDensity2dFilled",
GeomInteractivePolygon,
default_aes = add_default_interactive_aes(GeomDensity2dFilled)
)