8000 Change incorrect import in simple_anchored_artists example · matplotlib/matplotlib@abed7b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit abed7b6

Browse files
committed
Change incorrect import in simple_anchored_artists example
Add explicit setting of __all__ to prevent similiar errors
1 parent ba12801 commit abed7b6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

examples/axes_grid/simple_anchored_artists.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def draw_text(ax):
5-
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredText
5+
from matplotlib.offsetbox import AnchoredText
66
at = AnchoredText("Figure 1a",
77
loc=2, prop=dict(size=8), frameon=True,
88
)

lib/mpl_toolkits/axes_grid1/anchored_artists.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
DrawingArea, TextArea, VPacker)
77
from matplotlib.patches import Rectangle, Ellipse
88

9+
__all__ = ['AnchoredDrawingArea', 'AnchoredAuxTransformBox',
10+
'AnchoredEllipse', 'AnchoredSizeBar']
11+
912

1013
class AnchoredDrawingArea(AnchoredOffsetbox):
1114
@docstring.dedent

0 commit comments

Comments
 (0)
0