Skip to content

Adds a peek() method to GenericSpectrogram for quick-look visualizations #185

@MohamedAli1937

Description

@MohamedAli1937

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions