-
Notifications
You must be signed in to change notification settings - Fork 2
/
plotly_methods.R
executable file
·35 lines (34 loc) · 1.5 KB
/
plotly_methods.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
#' @name plot_ly
#' @rdname plot_ly
#' @inherit ttservice::plot_ly
#' @return `plotly`
#'
#' @examples
#' example(read10xVisium)
#' spe |>
#' plot_ly(x = ~ array_col, y = ~ array_row)
#'
#' @importFrom ttservice plot_ly
#' @export
plot_ly.SpatialExperiment <- function(data = data.frame(), ...,
type = NULL, name = NULL,
color = NULL, colors = NULL,
alpha = NULL, stroke = NULL,
strokes = NULL, alpha_stroke = 1,
size = NULL, sizes = c(10, 100),
span = NULL, spans = c(1, 20),
symbol = NULL, symbols = NULL,
linetype = NULL, linetypes = NULL,
split = NULL, frame = NULL,
width = NULL, height = NULL,
source="A") {
data |>
as_tibble() |>
ttservice::plot_ly(
..., type = type, name = name, color = color, colors = colors, alpha = alpha,
stroke = stroke, strokes = strokes, alpha_stroke = alpha_stroke, size = size,
sizes = sizes, span = span, spans = spans, symbol = symbol, symbols = symbols,
linetype = linetype, linetypes = linetypes, split = split, frame = frame,
width = width, height = height, source = source
)
}