View source: R/dplot3_spectrogram.R
dplot3_spectrogram | R Documentation |
Draw interactive spectrograms using plotly
dplot3_spectrogram(
x,
y,
z,
colorGrad.n = 101,
colors = NULL,
xlab = "Time",
ylab = "Frequency",
zlab = "Power",
hover.xlab = xlab,
hover.ylab = ylab,
hover.zlab = zlab,
zmin = NULL,
zmax = NULL,
zauto = TRUE,
hoverlabel.align = "right",
colorscale = "Jet",
colorbar.y = 0.5,
colorbar.yanchor = "middle",
colorbar.xpad = 0,
colorbar.ypad = 0,
colorbar.len = 0.75,
colorbar.title.side = "bottom",
showgrid = FALSE,
space = "rgb",
lo = "#18A3AC",
lomid = NULL,
mid = NULL,
midhi = NULL,
hi = "#F48024",
grid.gap = 0,
limits = NULL,
main = NULL,
key.title = NULL,
showticklabels = NULL,
theme = rtTheme,
font.size = NULL,
padding = 0,
displayModeBar = TRUE,
modeBar.file.format = "svg",
filename = NULL,
file.width = 500,
file.height = 500,
file.scale = 1,
...
)
x |
Numeric: Time |
y |
Numeric: Frequency |
z |
Numeric: Power |
colorGrad.n |
Integer: Number of distinct colors to generate using colorGrad. Default = 101 |
colors |
Character: Acts as a shortcut to defining |
xlab |
Character: x-axis label |
ylab |
Character: y-axis label |
zlab |
Character: z-axis label |
hover.xlab |
Character: x-axis label for hover |
hover.ylab |
Character: y-axis label for hover |
hover.zlab |
Character: z-axis label for hover |
zmin |
Numeric: Minimum value for color scale |
zmax |
Numeric: Maximum value for color scale |
zauto |
Logical: If TRUE, automatically set zmin and zmax |
hoverlabel.align |
Character: Alignment of hover labels |
colorscale |
Character: Color scale. Default = "Jet" |
colorbar.y |
Numeric: Y position of colorbar |
colorbar.yanchor |
Character: Y anchor of colorbar |
colorbar.xpad |
Numeric: X padding of colorbar |
colorbar.ypad |
Numeric: Y padding of colorbar |
colorbar.len |
Numeric: Length of colorbar |
colorbar.title.side |
Character: Side of colorbar title |
showgrid |
Logical: If TRUE, show grid |
space |
Character: Which colorspace to use. Option: "rgb", or "Lab". Default = "rgb".
Recommendation: If |
lo |
Color for low end |
lomid |
Color for low-mid |
mid |
Color for middle of the range or "mean", which will result in |
midhi |
Color for middle-high |
hi |
Color for high end |
grid.gap |
Integer: Space between cells. Default = 0 (no space) |
limits |
Numeric, length 2: Determine color range. Default = NULL, which automatically centers values around 0 |
main |
Character: Plot title |
key.title |
Character: Title of the key |
showticklabels |
Logical: If TRUE, show tick labels |
theme |
Character: "light", "dark" |
font.size |
Numeric: Font size |
padding |
Numeric: Padding between cells |
displayModeBar |
Logical: If TRUE, display the plotly mode bar |
modeBar.file.format |
Character: File format for image exports from the mode bar |
filename |
String (Optional: Path to file to save colorbar |
file.width |
Numeric: Width of exported image |
file.height |
Numeric: Height of exported image |
file.scale |
Numeric: Scale of exported image |
... |
Additional arguments to be passed to |
To set custom colors, use a minimum of lo
and hi
, optionnaly also
lomid
, mid
, midhi
colors and set colorscale = NULL
.
E.D. Gennatas
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.