10000 FIX · matplotlib/matplotlib@d00e472 · GitHub
[go: up one dir, main page]

Skip to content

Commit d00e472

Browse files
committed
FIX
1 parent 112d938 commit d00e472

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/users/explain/api_interfaces.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Third-party library "Data-object" interfaces
189189
--------------------------------------------
190190

191191
Some third party libraries have chosen to implement plotting for their data
192-
objects, e.g. `data.plot()`, is seen in `pandas`, `xarray`, and other
192+
objects, e.g. ``data.plot()``, is seen in `pandas`, `xarray`, and other
193193
third-party libraries. For illustrative purposes, a downstream library may
194194
implement a simple data container that has ``x`` and ``y`` data stored together,
195195
and then implements a ``plot`` method:
@@ -273,14 +273,14 @@ Most `~.axes.Axes` methods allow yet another API addressing by passing a
273273
import matplotlib.pyplot as plt
274274

275275
data = {'xdat': [0, 1, 2, 3], 'ydat': [0, 0.2, 0.4, 0.1]}
276-
fig, ax = plt.subplots()
276+
fig, ax = plt.subplots(figsize=(2, 2))
277277
ax.plot('xdat', 'ydat', data=data)
278278

279279

280280
Appendix: "pylab" interface
281281
---------------------------
282282

283283
There is one further interface that is highly discouraged, and that is to
284-
basically do `from matplotlib.pyplot import *`. This allows users to simply
285-
call `plot(x, y)`. While convenient, this can lead to obvious problems if the
284+
basically do ``from matplotlib.pyplot import *``. This allows users to simply
285+
call ``plot(x, y)``. While convenient, this can lead to obvious problems if the
286286
user unwittingly names a variable the same name as a pyplot method.

0 commit comments

Comments
 (0)
0