dBscale {seewave} | R Documentation |
This function displays a vertical dB colour scale to be used with
spectro
plots.
dBscale(collevels, palette = spectro.colors, side = 4, textlab = "Amplitude\n(dB)", cexlab = 0.75, fontlab = 1, collab = "black", ...)
collevels |
a set of levels which are used to partition the amplitude range of the spectrogram (in dB). |
palette |
a color palette function to be used to assign colors in
the plot, see note . |
side |
side of the axis, must be 2 (left) or 4 (right). |
textlab |
text of the label. |
cexlab |
character size of the label. |
fontlab |
font of the label. |
collab |
colour of the label. |
... |
other axis arguments. |
This function, based on filled.contour
by Ross Ihaka,
is not supposed to be used by itself but as a legend of spectro
.
Any colour palette can be used. In particular, it is possible to use other palettes coming with
seewave: rev.heat.colors
, rev.terrain.colors
,rev.topo.colors
,
rev.cm.colors
corresponding to the reverse of heat.colors
,
terrain.colors
, topo.colors
, cm.colors
.
Jérôme Sueur jerome.sueur@ibaic.u-psud.fr and Caroline Simonis-Sueur csimonis@mnhn.fr.
data(pellucens) # place the scale on the left and not on the right as spectro() does def.par <- par(no.readonly = TRUE) layout(matrix(c(2, 1), nc = 2), widths = c(1, 5)) par(mar=c(5,4,4,2)) spectro(pellucens, f=22050,wl=512,scale=FALSE) par(mar=c(5,3,4,2)) dBscale(collevels=seq(-30,0,1),side=2) par(def.par)