plotly_spec {OpenSpecy} | R Documentation |
Interactive plots for OpenSpecy objects
Description
These functions generate heatmaps, spectral plots, and interactive plots for OpenSpecy data.
Usage
plotly_spec(x, ...)
## Default S3 method:
plotly_spec(x, ...)
## S3 method for class 'OpenSpecy'
plotly_spec(
x,
x2 = NULL,
line = list(color = "rgb(255, 255, 255)"),
line2 = list(dash = "dot", color = "rgb(255,0,0)"),
font = list(color = "#FFFFFF"),
plot_bgcolor = "rgba(17, 0, 73, 0)",
paper_bgcolor = "rgb(0, 0, 0)",
showlegend = FALSE,
...
)
heatmap_spec(x, ...)
## Default S3 method:
heatmap_spec(x, ...)
## S3 method for class 'OpenSpecy'
heatmap_spec(
x,
z = NULL,
sn = NULL,
cor = NULL,
min_sn = NULL,
min_cor = NULL,
select = NULL,
font = list(color = "#FFFFFF"),
plot_bgcolor = "rgba(17, 0, 73, 0)",
paper_bgcolor = "rgb(0, 0, 0)",
colorscale = "Viridis",
showlegend = FALSE,
...
)
interactive_plot(x, ...)
## Default S3 method:
interactive_plot(x, ...)
## S3 method for class 'OpenSpecy'
interactive_plot(
x,
x2 = NULL,
select = NULL,
line = list(color = "rgb(255, 255, 255)"),
line2 = list(dash = "dot", color = "rgb(255,0,0)"),
font = list(color = "#FFFFFF"),
plot_bgcolor = "rgba(17, 0, 73, 0)",
paper_bgcolor = "rgb(0, 0, 0)",
colorscale = "Viridis",
...
)
Arguments
x |
an |
x2 |
an optional second |
line |
list; |
line2 |
list; |
font |
list; passed to |
plot_bgcolor |
color value; passed to |
paper_bgcolor |
color value; passed to |
showlegend |
whether to show the legend passed to
|
z |
optional numeric vector specifying the intensity values for the
heatmap. If not provided, the function will use the intensity values from the
|
sn |
optional numeric value specifying the signal-to-noise ratio
threshold. If provided along with |
cor |
optional numeric value specifying the correlation threshold. If
provided along with |
min_sn |
optional numeric value specifying the minimum signal-to-noise ratio for inclusion in the heatmap. Regions with SNR below this threshold will be excluded. |
min_cor |
optional numeric value specifying the minimum correlation for inclusion in the heatmap. Regions with correlation below this threshold will be excluded. |
select |
optional index of the selected spectrum to highlight on the heatmap. |
colorscale |
colorscale passed to |
... |
further arguments passed to |
Value
A plotly heatmap object displaying the OpenSpecy data. A subplot
containing the heatmap and spectra plot. A plotly object displaying the
spectra from the OpenSpecy
object(s).
Author(s)
Win Cowger, Zacharias Steinmetz
Examples
data("raman_hdpe")
tiny_map <- read_extdata("CA_tiny_map.zip") |> read_zip()
plotly_spec(raman_hdpe)
heatmap_spec(tiny_map, z = tiny_map$metadata$y, showlegend = TRUE)
sample_spec(tiny_map, size = 12) |>
interactive_plot(select = 2, x2 = raman_hdpe)