@@ -189,7 +189,7 @@ Third-party library "Data-object" interfaces
189
189
--------------------------------------------
190
190
191
191
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
193
193
third-party libraries. For illustrative purposes, a downstream library may
194
194
implement a simple data container that has ``x `` and ``y `` data stored together,
195
195
and then implements a ``plot `` method:
@@ -273,14 +273,14 @@ Most `~.axes.Axes` methods allow yet another API addressing by passing a
273
273
import matplotlib.pyplot as plt
274
274
275
275
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) )
277
277
ax.plot('xdat', 'ydat', data=data)
278
278
279
279
280
280
Appendix: "pylab" interface
281
281
---------------------------
282
282
283
283
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
286
286
user unwittingly names a variable the same name as a pyplot method.
0 commit comments