@@ -194,9 +194,10 @@ Placing Artist at the anchored location of the Axes
194
194
There are class of artist that can be placed at the anchored location
195
195
of the Axes. A common example is the legend. This type of artists can
196
196
be created by using the OffsetBox class. A few predefined classes are
197
- available in ``mpl_toolkits.axes_grid.anchored_artists ``. ::
197
+ available in ``mpl_toolkits.axes_grid1.anchored_artists `` others in
198
+ ``matplotlib.offsetbox `` ::
198
199
199
- from mpl_toolkits.axes_grid.anchored_artists import AnchoredText
200
+ from matplotlib.offsetbox import AnchoredText
200
201
at = AnchoredText("Figure 1a",
201
202
prop=dict(size=8), frameon=True,
202
203
loc=2,
@@ -220,7 +221,7 @@ drawing area. Note that the extents of the artists that are added to
220
221
the drawing area has nothing to do with the placement of the drawing
221
222
area itself. The initial size only matters. ::
222
223
223
- from mpl_toolkits.axes_grid .anchored_artists import AnchoredDrawingArea
224
+ from mpl_toolkits.axes_grid1 .anchored_artists import AnchoredDrawingArea
224
225
225
226
ada = AnchoredDrawingArea(20, 20, 0, 0,
226
227
loc=1, pad=0., frameon=False)
@@ -242,7 +243,7 @@ other coordinate than canvas pixel). You can use
242
243
``AnchoredDrawingArea `` except that the extent of the artist is
243
244
determined during the drawing time respecting the specified transform. ::
244
245
245
- from mpl_toolkits.axes_grid .anchored_artists import AnchoredAuxTransformBox
246
+ from mpl_toolkits.axes_grid1 .anchored_artists import AnchoredAuxTransformBox
246
247
247
248
box = AnchoredAuxTransformBox(ax.transData, loc=2)
248
249
el = Ellipse((0,0), width=0.1, height=0.4, angle=30) # in data coordinates!
@@ -375,7 +376,7 @@ Advanced Topics
375
376
Zoom effect between Axes
376
377
========================
377
378
378
- mpl_toolkits.axes_grid .inset_locator defines some patch classes useful
379
+ `` mpl_toolkits.axes_grid1 .inset_locator `` defines some patch classes useful
379
380
for interconnect two axes. Understanding the code requires some
380
381
knowledge of how mpl's transform works. But, utilizing it will be
381
382
straight forward.
0 commit comments