Describe the feature
Setting up a matplotlib figure, adding subplots, plotting, and manually adding a colorbar to inspect a spectrogram is repetitive and time-consuming. Adding a peek() method to GenericSpectrogram would streamline quick-look visualizations and align with the existing peek() conventions in sunpy.map.Map and radiospectra.spectrum.Spectrum.
Proposed solution
Add a peek(self, **kwargs) method to the GenericSpectrogram base class. This method would internally handle the creation of the matplotlib figure and axes, call self.plot(**kwargs), attach the resulting mesh to a Figure.colorbar(), and call .show(). This provides users with sensible visualization defaults out-of-the-box while keeping the core .plot() method clean.
Describe the feature
Setting up a matplotlib figure, adding subplots, plotting, and manually adding a colorbar to inspect a spectrogram is repetitive and time-consuming. Adding a
peek()method toGenericSpectrogramwould streamline quick-look visualizations and align with the existingpeek()conventions insunpy.map.Mapandradiospectra.spectrum.Spectrum.Proposed solution
Add a
peek(self, **kwargs)method to theGenericSpectrogrambase class. This method would internally handle the creation of thematplotlibfigure and axes, callself.plot(**kwargs), attach the resulting mesh to aFigure.colorbar(), and call.show(). This provides users with sensible visualization defaults out-of-the-box while keeping the core.plot()method clean.