File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change 33
44"""
55`matplotlib.pyplot` is a state-based interface to matplotlib. It provides
6- a MATLAB-like way of plotting.
6+ an implicit, MATLAB-like, way of plotting. It also opens figures on your
7+ screen, and acts as the figure GUI manager.
78
89pyplot is mainly intended for interactive plots and simple cases of
910programmatic plot generation::
1516 y = np.sin(x)
1617 plt.plot(x, y)
1718
18- The object-oriented API is recommended for more complex plots.
19+ The explicit (object-oriented) API is recommended for complex plots, though
20+ pyplot is still usually used to create the figure and often the axes in the
21+ figure. See `.pyplot.figure`, `.pyplot.subplots`, and
22+ `.pyplot.subplot_mosaic` to create figures, and
23+ :doc:`Axes API <../axes_api>` for the plotting methods on an axes::
24+
25+ import numpy as np
26+ import matplotlib.pyplot as plt
27+
28+ x = np.arange(0, 5, 0.1)
29+ y = np.sin(x)
30+ fig, ax = plt.subplots()
31+ ax.plot(x, y)
1932"""
2033
2134import functools
You can’t perform that action at this time.
0 commit comments