Plotting

The pygsp2.plotting module implements functionality to plot PyGSP2 objects with a pyqtgraph or matplotlib drawing backend (which can be controlled by the BACKEND constant or individually for each plotting call).

Most users won’t use this module directly. Graphs (from pygsp2.graphs) are to be plotted with pygsp2.graphs.Graph.plot() and pygsp2.graphs.Graph.plot_spectrogram(). Filters (from pygsp2.filters) are to be plotted with pygsp2.filters.Filter.plot().

pygsp2.plotting.BACKEND

The default drawing backend to use if none are provided to the plotting functions. Should be either 'matplotlib' or 'pyqtgraph'. In general pyqtgraph is better for interactive exploration while matplotlib is better at generating figures to be included in papers or elsewhere.

pygsp2.plotting.close(*args, **kwargs)[source]

Close last created figure, alias to plt.close().

pygsp2.plotting.close_all()[source]

Close all opened windows.

pygsp2.plotting.show(*args, **kwargs)[source]

Show created figures, alias to plt.show().

By default, showing plots does not block the prompt. Calling this function will block execution.