dplot3_spectrogram: Interactive Spectrogram

View source: R/dplot3_spectrogram.R

dplot3_spectrogramR Documentation

Interactive Spectrogram

Description

Draw interactive spectrograms using plotly

Usage

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,
  ...
)

Arguments

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 lo, mid, etc for a number of defaults: "french", "penn", "grnblkred",

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 mid is "white" or "black" (default), use "rgb", otherwise "Lab"

lo

Color for low end

lomid

Color for low-mid

mid

Color for middle of the range or "mean", which will result in colorOp(c(lo, hi), "mean"). If mid = NA, then only lo and hi are used to create the color gradient.

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 heatmaply::heatmaply

Details

To set custom colors, use a minimum of lo and hi, optionnaly also lomid, mid, midhi colors and set colorscale = NULL.

Author(s)

E.D. Gennatas


egenn/rtemis documentation built on Oct. 28, 2024, 6:30 a.m.