I need to include spectrograms in a manuscript and was wondering what peoples' preferred R packages/code settings/etc. were for high-quality spectrogram plots? I know there are a bunch of options in terms of R packages, e.g., signal, seewave, warbleR and then tons of different spectrogram plotting options for each; what are your preferences? Even down to things like palettes/color scales, etc. Obviously exact spectrogram settings will be dependent on the specific signal, but I'm more thinking about like the plotting settings for spectrogram functions in the aforementioned packages. Any insights on this would be much appreciated!
Here are the spectrogram settings I have come to like the best (for a synthetic rainforest rocket frog call):
library(seewave) library(viridis) spectro(Rf_synth, wl = 512, ovlp = 90, osc = TRUE, grid = FALSE, palette = turbo, coly0 = "black", collevels = seq(-30, 0, 0.5), heights = c(1,1), flim = c(5, 8), tlim = c(0, 0.2)) rug(x = seq(5, 8 ,0.1), ticksize = 0.01, side = 2)
Like you say, windows lengths and overlaps will depend on your signal. The colours in the 'viridis' library are color-blind friendly, and 'turbo' looks the best in my opinion ('magma' or 'inferno' are also visually pleasant, in my opinion). The rug() function just add little ticks on the frequency axis. It looks like this:
I would like very much to see other people's spectrograms and settings too!