data: List object, spectrogram to be plotted. Must be output of signal_spectrogram or of equivalent structure.
legend: Logical value, option to add colour bar legend. Legend label can be changed by zlab.
keep_par: Logical value, option to omit resetting plot parameters after function execution. Useful for adding further data to the PSD plot. Default is FALSE (parameters are reset to original values).
agg: Integer vector of length two, factors of image aggregation, i.e. in time and frequency dimension. Useful to decrease image size. Default is c(1, 1) (no aggregation).
...: Additional arguments passed to the plot function.
Returns
Graphic output of a spectrogram.
Details
As of version 0.7.2, the value range (zlim) is no longer set to the full data range but to the range between quantiles 0.01 and 0.99. For the full value range to be plotted, use zlim = range(data$PSD$S).
As of version 0.7.2, the default plot colour has changed from the "jet" colour palette to the "Inferno" palette. This due to perception issues with the "jet" palette. If one wants to decisively use the "jet" colours, this can be done by adding the keyword col = "jet". To use other colour schemes, such as sequential HCL schemes from the colorspace package, specify them as additional argument, e.g. col = colorspace::sequential_hcl(200, palette = "Plasma"), col = colorspace::sequential_hcl(200, palette = "Inferno"), col = colorspace::sequential_hcl(200, palette = "Viridis").
Examples
## load example data setdata(rockfall)## deconvolve signalrockfall <- signal_deconvolve(data = rockfall_eseis)## calculate spectrogramPSD <- signal_spectrogram(data = rockfall)## plot spectrogramplot_spectrogram(data = PSD)## plot spectrogram with legend and labels in rainbow coloursplot_spectrogram(data = PSD, xlab ="Time (min)", ylab ="f (Hz)", main ="Power spectral density estimate", legend =TRUE, zlim = c(-220,-70), col = rainbow(100))## plot spectrogram with frequencies in log scaleplot_spectrogram(data = PSD, log ="y")## plot spectrogram with formatted time axis (minutes and seconds)plot_spectrogram(data = PSD, format ="%M:%S")