|
8 | 8 | import matplotlib.colors as mcolors |
9 | 9 | import matplotlib.collections as mcollections |
10 | 10 | import matplotlib.patches as patches |
11 | | -import matplotlib.container as container |
12 | 11 |
|
13 | 12 |
|
14 | 13 | __all__ = ['streamplot'] |
@@ -50,7 +49,7 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, |
50 | 49 |
|
51 | 50 | Returns |
52 | 51 | ------- |
53 | | - *stream_container* : StreamplotContainer |
| 52 | + *stream_container* : StreamplotSet |
54 | 53 | Container object with attributes |
55 | 54 | lines : `matplotlib.collections.LineCollection` of streamlines |
56 | 55 | arrows : collection of `matplotlib.patches.FancyArrowPatch` objects |
@@ -159,19 +158,15 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None, |
159 | 158 | axes.autoscale_view(tight=True) |
160 | 159 |
|
161 | 160 | ac = matplotlib.collections.PatchCollection(arrows) |
162 | | - stream_container = StreamplotContainer(lc, arrows=ac) |
| 161 | + stream_container = StreamplotSet(lc, ac) |
163 | 162 | return stream_container |
164 | 163 |
|
165 | 164 |
|
166 | | -class StreamplotContainer(container.Container): |
| 165 | +class StreamplotSet(object): |
167 | 166 |
|
168 | | - def __new__(cls, *kl, **kwargs): |
169 | | - return tuple.__new__(cls) |
170 | | - |
171 | | - def __init__(self, lines, arrows=None, **kwargs): |
| 167 | + def __init__(self, lines, arrows, **kwargs): |
172 | 168 | self.lines = lines |
173 | 169 | self.arrows = arrows |
174 | | - container.Container.__init__(self, lines, **kwargs) |
175 | 170 |
|
176 | 171 |
|
177 | 172 | # Coordinate definitions |
|
0 commit comments