pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation:
import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) plt.plot(x, y)
The explicit (object-oriented) API is recommended for complex plots, though pyplot is still usually used to create the figure and often the axes in the figure. See .pyplot.figure
, .pyplot.subplots
, and .pyplot.subplot_mosaic
to create figures, and Axes API <../axes_api>
for the plotting methods on an axes:
import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) fig, ax = plt.subplots() ax.plot(x, y)
matplotlib.pyplot
is a state-based interface to matplotlib. It provides an implicit, MATLAB-like, way of plotting. It also opens figures on your screen, and acts as the figure GUI manager.
matplotlib.pyplot
is a state-based interface to matplotlib. It provides an implicit, MATLAB-like, way of plotting. It also opens figures on your screen, and acts as the figure GUI manager.
pyplot is mainly intended for interactive plots and simple cases of programmatic plot generation:
import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) plt.plot(x, y)
The explicit (object-oriented) API is recommended for complex plots, though pyplot is still usually used to create the figure and often the axes in the figure. See .pyplot.figure
, .pyplot.subplots
, and .pyplot.subplot_mosaic
to create figures, and Axes API <../axes_api>
for the plotting methods on an axes:
import numpy as np import matplotlib.pyplot as plt x = np.arange(0, 5, 0.1) y = np.sin(x) fig, ax = plt.subplots() ax.plot(x, y)
The following pages refer to to this document either explicitly or contain code examples using this.
scipy.signal.exponentialscipy.signal.windows._windows.boxcarscipy.signal._wavelets.morlet2scipy.interpolate._polyint.krogh_interpolatescipy.signal._filter_design.gammatonescipy.signal._ltisys.dimpulsescipy.spatial._qhull.ConvexHullscipy.signal.bartlettscipy.signal._bsplines.cspline1d_evalscipy.interpolate._bsplines.make_lsq_splinescipy.interpolate._bspl.evaluate_all_bsplscipy.special._spherical_bessel.spherical_knscipy.signal.windows._windows.barthannscipy.signal.chebwinscipy.signal._czt.CZTscipy.spatial.transform._rotation_spline.RotationSplinescipy.signal.boxcarscipy.interpolate._polyint.barycentric_interpolatescipy.signal._arraytools.even_extscipy.signal._signaltools.lfilterscipy.interpolate._ndgriddata.griddatascipy.signal.windows._windows.hannscipy.signal._waveforms.squarescipy.signal._bsplines.cspline1dscipy.signal._filter_design.cheb2ordscipy.signal._filter_design.iirdesignscipy.signal._peak_finding.peak_widthsscipy.signal._ltisys.lsim2scipy.optimize._optimize.rosenscipy.signal.blackmanharrisscipy.interpolate._polyint.approximate_taylor_polynomialscipy.signal._filter_design.lp2lpscipy.fft._basic.fftscipy.signal._signaltools.resample_polyscipy.integrate._quadrature.cumulative_trapezoidscipy.integrate._quad_vec.quad_vecscipy.signal.windows._windows.chebwinscipy.signal.parzenscipy.signal._filter_design.cheb1ordscipy.signal._filter_design.buttordscipy.interpolate._interpolate.interp2dscipy.signal._ltisys.dfreqrespscipy.signal.windows._windows.dpssscipy.signal._waveforms.sweep_polyscipy.interpolate._interpolate.interp1dscipy.signal.barthannscipy.interpolate._bsplines.make_interp_splinescipy.signal._signaltools.oaconvolvescipy.signal._filter_design.iirfilterscipy.signal._ltisys.dlti.bodescipy.signal._filter_design.sosfreqzscipy.signal._max_len_seq.max_len_seqscipy.signal.windows._windows.general_cosinescipy.signal._czt.zoom_fftscipy.signal.flattopscipy.signal._ltisys.dstepscipy.signal._fir_filter_design.minimum_phasescipy.signal.windows._windows.triangscipy.signal._filter_design.ellipscipy.special._orthogonal.jacobiscipy.signal.windows._windows.exponentialscipy.signal._filter_design.lp2bsscipy.special._orthogonal.genlaguerrescipy.signal._signaltools.filtfiltscipy.misc._common.facescipy.signal.windows._windows.blackmanscipy.fft._basic.ifftscipy.signal.windows._windows.cosinescipy.signal.gaussianscipy.signal._fir_filter_design.kaiserordscipy.signal._waveforms.sawtoothscipy.interpolate._fitpack2.UnivariateSplinescipy.spatial._kdtree.KDTree.query_ball_pointscipy.signal._filter_design.butterscipy.signal._ltisys.impulsescipy.signal._filter_design.group_delayscipy.signal._spectral_py.csdscipy.signal.windows._windows.tukeyscipy.interpolate._fitpack_impl.splrepscipy.interpolate._interpolate.lagrangescipy.spatial._plotutils.voronoi_plot_2dscipy.signal._filter_design.iircombscipy.signal._filter_design.besselscipy.signal._filter_design.bilinearscipy.signal.hannscipy.signal._lti_conversion.cont2discretescipy.spatial._kdtree.KDTree.query_pairsscipy.signal._signaltools.correlatescipy.signal.tukeyscipy.spatial._plotutils.convex_hull_plot_2dscipy.signal._ltisys.stepscipy.signal.bohmanscipy.signal._spectral_py.istftscipy.signal._wavelets.cwtscipy.signal.hammingscipy.interpolate._ndgriddata.NearestNDInterpolatorscipy.signal.windows._windows.kaiserscipy.signal.cosinescipy.misc._common.electrocardiogramscipy.signal._waveforms.chirpscipy.signal._czt.czt_pointsscipy.signal._ltisys.lti.bodescipy.signal._signaltools.correlate2dscipy.signal._signaltools.wienerscipy.signal._signaltools.sosfilt_ziscipy.special._orthogonal.chebyuscipy.signal._bsplines.qspline1dscipy.signal._ltisys.lsimscipy.signal._signaltools.resamplescipy.interpolate._bsplines.BSplinescipy.linalg._basic.lstsqscipy.spatial._qhull.tsearchscipy.signal._wavelets.rickerscipy.spatial._qhull.Voronoiscipy.spatial._geometric_slerp.geometric_slerpscipy.signal._ltisys.step2scipy.signal._spectral_py.lombscarglescipy.interpolate._fitpack2.LSQUnivariateSplinescipy.signal._filter_design.freqzscipy.signal._filter_design.iirpeakscipy.special._orthogonal.chebytscipy.signal._signaltools.sosfiltfiltscipy.interpolate._fitpack2.RectSphereBivariateSplinescipy.signal._bsplines.qspline1d_evalscipy.signal._ltisys.bodescipy.signal._waveforms.unit_impulsescipy.signal._fir_filter_design.firlsscipy.fft._basic.ifftnscipy.signal._signaltools.decimatescipy.signal._filter_design.freqz_zpkscipy.special._orthogonal.laguerrescipy.signal.windows._windows.taylorscipy.signal._signaltools.sosfiltscipy.spatial._qhull.Delaunayscipy.signal._ltisys.impulse2scipy.signal._spectral_py.welchscipy.signal.windows._windows.bartlettscipy.signal._filter_design.lp2hpscipy.spatial._plotutils.delaunay_plot_2dscipy.signal.triangscipy.optimize._optimize.bracketscipy.interpolate._fitpack2.InterpolatedUnivariateSplinescipy.special._orthogonal.hermitescipy.signal.windows._windows.bohmanscipy.signal._spectral_py.spectrogramscipy.signal._arraytools.odd_extscipy.signal._czt.ZoomFFTscipy.interpolate._rbfinterp.RBFInterpolatorscipy.signal._ltisys.place_polesscipy.optimize._minpack_py.curve_fitscipy.spatial._qhull.HalfspaceIntersectionscipy.signal._spectral_py.periodogramscipy.interpolate._cubic.pchip_interpolatescipy.signal.blackmanscipy.signal.windows._windows.nuttallscipy.optimize._zeros_py.newtonscipy.signal._filter_design.freqsscipy.signal.windows._windows.general_gaussianscipy.spatial._kdtree.KDTree.query_ball_treescipy.signal.windows._windows.gaussianscipy.signal.windows._windows.flattopscipy.special._orthogonal.gegenbauerscipy.signal._signaltools.fftconvolvescipy.signal._waveforms.gausspulsescipy.special._spherical_bessel.spherical_ynscipy.signal._ltisys.freqrespscipy.signal._filter_design.lp2bpscipy.signal._filter_design.iirnotchscipy.signal._peak_finding.find_peaksscipy.signal.windows._windows.general_hammingscipy.special._basic.diricscipy.signal.kaiserscipy.misc._common.ascentscipy.signal._bsplines.spline_filterscipy.signal._fir_filter_design.remezscipy.interpolate._bsplines.BSpline.integratescipy.signal._spectral_py.coherencescipy.signal.general_gaussianscipy.signal._spectral_py.stftscipy.signal.windows._windows.parzenscipy.signal._signaltools.convolvescipy.fft._basic.fftnscipy.special._spherical_bessel.spherical_jnscipy.interpolate._fitpack2.LSQSphereBivariateSplinescipy.signal._peak_finding.peak_prominencesscipy.signal._filter_design.freqs_zpkscipy.signal.nuttallscipy.special._spherical_bessel.spherical_inscipy.signal._filter_design.cheby1scipy.signal._signaltools.hilbertscipy.signal.windows._windows.blackmanharrisscipy.integrate._bvp.solve_bvpscipy.integrate._odepack_py.odeintscipy.signal._filter_design.ellipordscipy.signal._arraytools.const_extscipy.integrate._ivp.ivp.solve_ivpscipy.signal._filter_design.cheby2scipy.signal._signaltools.convolve2dscipy.interpolate._cubic.CubicSplinescipy.interpolate._fitpack_py.splrepscipy.interpolate.interpnd.LinearNDInterpolatorscipy.signal.windows._windows.hammingscipy.signal._filter_design.bilinear_zpkscipy.signal._ltisys.dbodedask.array.ufunc.wrap_elemwise.<locals>.wrappeddask.array.random.RandomState.gammadask.array.random.RandomState.triangulardask.array.random.RandomState.standard_gammadask.array.random.RandomState.standard_tdask.array.ufunc.coshdask.array.random.RandomState.noncentral_chisquaredask.array.ufunc.arccosdask.array.random.RandomState.standard_cauchydask.array.random.RandomState.weibulldask.array.random.RandomState.laplacedask.array.random.RandomState.paretodask.array.random.RandomState.powerdask.array.random.RandomState.logisticdask.array.random.RandomState.lognormaldask.array.random.RandomState.random_integersdask.array.random.RandomState.poissondask.array.random.RandomState.zipfdask.array.random.RandomState.hypergeometricdask.array.random.RandomState.uniformdask.array.creation.meshgriddask.array.random.RandomState.rayleighdask.array.ufunc.absolutedask.array.random.RandomState.vonmisesdask.array.ufunc.expdask.array.random.RandomState.noncentral_fdask.array.ufunc.arctandask.array.random.RandomState.walddask.array.random.RandomState.logseriesdask.array.random.RandomState.normaldask.array.random.RandomState.gumbelskimage.filters._gabor.gaborskimage.filters._gabor.gabor_kernelskimage.viewer.canvastools.painttool.PaintToolmatplotlib.cm.ColormapRegistry.__call__matplotlib.pyplotmatplotlib.widgets.SpanSelectormatplotlib.backends.backend_pdf.PdfPagesmatplotlib.widgets.RectangleSelectorHover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them