@@ -547,7 +547,7 @@ TeX backend is used (i.e. ``text.usetex`` is ``True``).
547547 mpl.rcParams['mathtext.fontset'] = 'cm'
548548 mpl.rcParams['mathtext.rm'] = 'serif'
549549
550- fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3))
550+ fig, ax = plt.subplots(tight_layout=True, figsize=(3, 3))
551551
552552 ax.plot(range(15), label=r'int: $15 \i nt_0^\i nfty dx$')
553553 ax.legend()
@@ -606,6 +606,7 @@ Legends
606606 with mpl.rc_context(rc=rcparams):
607607 x = range(N)
608608 y = np.cumsum(np.random.randn(N) )
609+ # unpack the single Line2D artist
609610 ln, = ax.plot(x, y, marker='s',
610611 linestyle='-', label='plot')
611612 ax.fill_between(x, y, 0, label='fill', alpha=.5, color=ln.get_color())
@@ -768,8 +769,6 @@ a cleaner separation between subplots.
768769
769770 fig = plt.figure(figsize=(6, 6), tight_layout=True)
770771
771-
772-
773772 demo(fig, classic, 'classic', 1)
774773 demo(fig, {}, 'v2.0', 2)
775774
@@ -881,12 +880,12 @@ the margins, the `~matplotlib.artist.Artist` class has gained the properties :
881880 - `~matplotlib.artist.Artist.margins `
882881
883882along with the complimentary ``get_* `` and ``set_* `` methods. When
884- computing the view limits, each `~matplotlib.artist.Artist ` is checked.
885- If *any * artist does not call for a margin on a given side, the margin
886- will be omitted there.
887- Some plotting methods and artists have margins disabled by default
888- (for example `~matplotlib.axes.Axes.bar ` disables the bottom margin).
889- To cancel the margins for a specific artist, pass the kwargs :
883+ computing the view limits, each `~matplotlib.artist.Artist ` is
884+ checked. If *any * artist returns ` False ` on a given side,
885+ the margin will be omitted there. Some plotting methods and artists
886+ have margins disabled (` False `) by default (for example
887+ `~matplotlib.axes.Axes.bar ` disables the bottom margin). To cancel
888+ the margins for a specific artist, pass the kwargs :
890889
891890 - ``top_margin=False ``
892891 - ``bottom_margin=False ``
0 commit comments