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",
  k_row = 1,
  k_col = 1,
  grid.gap = 0,
  limits = NULL,
  main = NULL,
  key.title = NULL,
  showticklabels = NULL,
  theme = rtTheme,
  row_side_colors = NULL,
  row_side_palette = NULL,
  col_side_colors = NULL,
  col_side_palette = NULL,
  font.size = NULL,
  padding = 0,
  displayModeBar = TRUE,
  modeBar.file.format = "svg",
  filename = NULL,
  file.width = 500,
  file.height = 500,
  file.scale = 1,
  ...
)

Arguments

x

Input matrix

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

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

Float, length 2: Determine color range. Default = NULL, which automatically centers values around 0

main

Character: Plot title

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 May 4, 2024, 7:40 p.m.