
Examples — Matplotlib 3.10.1 documentation
Currently Matplotlib supports PyQt/PySide, PyGObject, Tkinter, and wxPython. When embedding Matplotlib in a GUI, you must use the Matplotlib API directly rather than the pylab/pyplot procedural interface, so take a look at the examples/api directory for …
Pyplot tutorial — Matplotlib 3.10.1 documentation
Introduction to pyplot # matplotlib.pyplot is a collection of functions that make matplotlib work like MATLAB. Each pyplot function makes some change to a figure: e.g., creates a figure, creates …
Sample plots in Matplotlib — Matplotlib 3.4.3 documentation
Aug 13, 2021 · Sample plots in Matplotlib ¶ Here you'll find a host of example plots with the code that generated them.
Line plot — Matplotlib 3.10.1 documentation
import matplotlib.pyplot as plt import numpy as np # Data for plotting t = np.arange(0.0, 2.0, 0.01) s = 1 + np.sin(2 * np.pi * t) fig, ax = plt.subplots() ax.plot(t, s) ax.set(xlabel='time (s)', ylabel='voltage (mV)', title='About as simple as it gets, folks') …
matplotlib.pyplot.plot — Matplotlib 3.10.1 documentation
matplotlib.pyplot.plot # matplotlib.pyplot.plot(*args, scalex=True, scaley=True, data=None, **kwargs) [source] # Plot y versus x as lines and/or markers. Call signatures:
Plot types — Matplotlib 3.10.1 documentation
Plot types # Overview of many common plotting commands provided by Matplotlib. See the gallery for more examples and the tutorials page for longer examples.
Quick start guide — Matplotlib 3.10.1 documentation
Matplotlib graphs your data on Figure s (e.g., windows, Jupyter widgets, etc.), each of which can contain one or more Axes, an area where points can be specified in terms of x-y coordinates (or theta-r in a polar plot, x-y-z in a 3D plot, etc.).
Plotting data on a map (Example Gallery) - Matplotlib
There are a number of Basemap instance methods for plotting data: contour(): draw contour lines. contourf(): draw filled contours. imshow(): draw an image. pcolor(): draw a pseudocolor plot. pcolormesh(): draw a pseudocolor plot (faster version for regular meshes). plot(): draw lines and/or markers. scatter(): draw points with markers.
Tutorials — Matplotlib 3.10.1 documentation
Tutorials # This page contains a few tutorials for using Matplotlib. For the old tutorials, see below. For shorter examples, see our examples page. You can also find external resources and a FAQ in our user guide.
Histograms — Matplotlib 3.10.1 documentation
Generate data and plot a simple histogram # To generate a 1D histogram we only need a single vector of numbers. For a 2D histogram we'll need a second vector. We'll generate both below, and show the histogram for each vector.