Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Change return value of `streamplot`.

- Return object that derives from `object` since deriving from `Container` was not beneficial.
- This return value is a stopgap; the final return value should allow users to set the colormap, alpha, etc. for both lines and arrows.
  • Loading branch information...
1 parent 57a7d3d commit 9875323ed79767751f05a109e44c5da7556e6ce2 @tonysyu committed
Showing with 4 additions and 9 deletions.
  1. +4 −9 lib/matplotlib/
13 lib/matplotlib/
@@ -8,7 +8,6 @@
import matplotlib.colors as mcolors
import matplotlib.collections as mcollections
import matplotlib.patches as patches
-import matplotlib.container as container
__all__ = ['streamplot']
@@ -50,7 +49,7 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
- *stream_container* : StreamplotContainer
+ *stream_container* : StreamplotSet
Container object with attributes
lines : `matplotlib.collections.LineCollection` of streamlines
arrows : collection of `matplotlib.patches.FancyArrowPatch` objects
@@ -159,19 +158,15 @@ def streamplot(axes, x, y, u, v, density=1, linewidth=None, color=None,
ac = matplotlib.collections.PatchCollection(arrows)
- stream_container = StreamplotContainer(lc, arrows=ac)
+ stream_container = StreamplotSet(lc, ac)
return stream_container
-class StreamplotContainer(container.Container):
+class StreamplotSet(object):
- def __new__(cls, *kl, **kwargs):
- return tuple.__new__(cls)
- def __init__(self, lines, arrows=None, **kwargs):
+ def __init__(self, lines, arrows, **kwargs):
self.lines = lines
self.arrows = arrows
- container.Container.__init__(self, lines, **kwargs)
# Coordinate definitions

0 comments on commit 9875323

Please sign in to comment.
Something went wrong with that request. Please try again.