trim ppsd.plot_spectrograms images

Dear Januka,

Thanks for your answer. However, your suggestion refers to PPSD.plot, but my question was on PPSD.plot_spectrogram, as I’m interested in plotting not the PDf but the actual spectrogram and “period_lim” does not seem to be defined ther

Best,
Jordi

Hi Jordi,
Sorry. Yes, you are right.

Perhaps a work around is to trim your spectrogram when building the PPSD itself, using the period_limits option. Alternatively, you could saturate your colormap using clim in plot_spectrogram if you prefer that?

Januka

Januka Attanayake

Research Fellow | Earthquake Seismology
Homepage: https://sites.google.com/site/janukaattanayake

School of Earth Sciences | McCoy Bldg. 200
University of Melbourne | Parkville 3010 VIC
Australia

Hi Jordi,

just use show=False and make adjustments on the resulting figure before
showing or saving it.

import matplotlib.pyplot as plt
fig = ppsd.plot_spectrogram(..., show=False)
fig.axes[0].set_ylim(..., ...)
plt.show()

best,
Tobias