Esempio n. 1
0
 def __init__(self,
              x,
              y,
              cz,
              cmap='jet',
              linestyle='solid',
              pickradius=5,
              alpha=None,
              **kargs):
     if linestyle is None:
         kargs['linestyle'] = 'solid'
         self._nodraw = True
     else:
         kargs['linestyle'] = linestyle
         self._nodraw = False
     self.x = x
     self.y = y
     self.cz = cz
     self.set_xydata()
     self.pickradius = pickradius
     segments = self._calc_segments()
     #        self.set_linewidth(1)
     LineCollection.__init__(self, segments, **kargs)
     self.set_array(cz)
     self._cz_linesytle_name = linestyle
     #        self._cz_alpha = alpha
     self._transformed_path = None
     self.set_alpha(alpha)
Esempio n. 2
0
 def __init__(self, coords, plotSegments, linewidths, linestyle, colors,
              picker):
     LineCollection.__init__(self,
                             plotSegments,
                             linewidths=linewidths,
                             linestyle=linestyle,
                             colors=colors,
                             picker=picker)
 def __init__(self, coords, plotSegments, linewidths, linestyle, colors, picker):
     LineCollection.__init__(self,
                             plotSegments,
                             linewidths=linewidths,
                             linestyle=linestyle,
                             colors=colors,
                             picker=picker
                             )
Esempio n. 4
0
 def __init__(self, *kl, **kw):
     '''The same arguments as in matplotlib.collections.LineCollection.
     To initiate arrows, additionally use 'add_arrows'.
     '''
     
     LineCollection.__init__(self, *kl, **kw)
     self.kw = kw                                # to be reused in add_arrows
     self.draw_arrows = True
     
     return
Esempio n. 5
0
    def __init__(self,  x, y, cz, 
                 cmap='jet', linestyle='solid', 
                 pickradius=5,  alpha = None,  **kargs):
        if linestyle is None:
           kargs['linestyle'] = 'solid'
           self._nodraw = True
        else:
           kargs['linestyle'] = linestyle
           self._nodraw = False
        self.x = x
        self.y = y
        self.cz = cz
        self.set_xydata()
        self.pickradius = pickradius
        segments = self._calc_segments()
#        self.set_linewidth(1)
        LineCollection.__init__(self, segments, **kargs)
        self.set_array(cz)
        self._cz_linesytle_name = linestyle
#        self._cz_alpha = alpha
        self._transformed_path = None
        self.set_alpha(alpha)
Esempio n. 6
0
    def __init__(self, Points, Angles, fig, axis):

        self.Points = Points
        self.Angles = Angles
        
        self.ArrowLength = 0.3 # should be inches 
        self.ArrowHeadSize = 0.08 # should be inches
        self.ArrowHeadAngle = 45. # degrees

        self.CalcArrowPoints()
        self.CalcArrows()

        LineCollection.__init__(self,
                                self.Arrows,
                                offsets=self.Points,
                                transOffset=axis.transData, # transforms the x,y offsets
                                )
#        trans = transforms.scale_transform(fig.dpi, fig.dpi) 
        trans = transforms.ScaledTranslation(fig.dpi, fig.dpi) 
        self.set_transform(trans)  # the points to pixels transform

        return None
Esempio n. 7
0
 def __init__(self, segments, *args, **kwargs):
     '''
     Keyword arguments are passed onto :func:`~matplotlib.collections.LineCollection`.
     '''
     LineCollection.__init__(self, segments, *args, **kwargs)
Esempio n. 8
0
 def __init__(self, segments, *args, **kwargs):
     '''
     Keyword arguments are passed onto :func:`~matplotlib.collections.LineCollection`.
     '''
     LineCollection.__init__(self, segments, *args, **kwargs)
Esempio n. 9
0
 def __init__(self, segments, *args, **kwargs):
     LineCollection.__init__(self, segments, *args, **kwargs)
Esempio n. 10
0
 def __init__(self, segments, *args, **kwargs):
     LineCollection.__init__(self, segments, *args, **kwargs)