Ejemplo n.º 1
0
    def __init__(self, parent, text="", x=0, y=0, z=0, fontName=None, fontSize=9, color="k"):
        Wobject.__init__(self, parent)
        BaseText.__init__(self, text, fontName, fontSize, color)

        # store coordinates
        self._x, self._y, self._z = x, y, z

        # for internal use
        self._screenx, self._screeny, self._screenz = 0, 0, 0
Ejemplo n.º 2
0
 def __init__(self, parent, text='', x=0, y=0, z=0, fontname=None):
     Wobject.__init__(self, parent)
     BaseText.__init__(self, text, fontname)
     
     # store coordinates
     self._x, self._y, self._z = x, y, z
     
     # for internal use
     self._screenx, self._screeny, self._screenz = 0, 0, 0
Ejemplo n.º 3
0
    def __init__(self, parent, text='', x=0, y=0, z=0, fontname=None):
        Wobject.__init__(self, parent)
        BaseText.__init__(self, text, fontname)

        # store coordinates
        self._x, self._y, self._z = x, y, z

        # for internal use
        self._screenx, self._screeny, self._screenz = 0, 0, 0
Ejemplo n.º 4
0
    def __init__(self, parent, points):
        Wobject.__init__(self, parent)

        # Store points
        self.SetPoints(points)

        # init line properties
        self._lw, self._ls, self._lc = 1, '-', 'b'
        # init marker properties
        self._mw, self._ms, self._mc = 7, '', 'b'
        # init marker edge properties
        self._mew, self._mec = 1, 'k'

        # alpha values
        self._alpha1 = 1
Ejemplo n.º 5
0
    def __init__(self, parent, points):
        Wobject.__init__(self, parent)
        
        # Store points
        self.SetPoints(points)
        
        # init line properties
        self._lw, self._ls, self._lc = 1, '-', 'b'
        # init marker properties
        self._mw, self._ms, self._mc = 7, '', 'b'
        # init marker edge properties
        self._mew, self._mec = 1, 'k'

        # alpha values
        self._alpha1 = 1
Ejemplo n.º 6
0
    def __init__(self,
                 parent,
                 text='',
                 x=0,
                 y=0,
                 z=0,
                 fontName=None,
                 fontSize=9,
                 color='k'):
        Wobject.__init__(self, parent)
        BaseText.__init__(self, text, fontName, fontSize, color)

        # store coordinates
        self._x, self._y, self._z = x, y, z

        # for internal use
        self._screenx, self._screeny, self._screenz = 0, 0, 0
Ejemplo n.º 7
0
    def __init__(self, parent, points):
        Wobject.__init__(self, parent)

        # make a copy
        points = points.copy()

        # add z dimension to points if not available
        if points.ndim == 2:
            # a bit dirty...
            tmp = points._data, 0.1*np.ones((len(points._data),1), dtype='float32')
            points._data = np.concatenate(tmp,1)
        self._points = points

        # init line properties
        self._lw, self._ls, self._lc = 1, '-', 'b'
        # init marker properties
        self._mw, self._ms, self._mc = 7, '', 'b'
        # init marker edge properties
        self._mew, self._mec = 1, 'k'

        # alpha values
        self._alpha1 = 1
Ejemplo n.º 8
0
 def _GetLimits(self):
     """ Get the limits in world coordinates between which the object exists.
     """
     
     # Obtain untransformed coords (if not an empty set)
     if not self._points:
         return None
     else:
         x1, x2 = self._points[:,0].min(), self._points[:,0].max()
         y1, y2 = self._points[:,1].min(), self._points[:,1].max()
         z1, z2 = self._points[:,2].min(), self._points[:,2].max()
     
     # There we are
     return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)
Ejemplo n.º 9
0
 def _GetLimits(self):
     """ Get the limits in world coordinates between which the object exists.
     """
     
     # Obtain untransformed coords (if not an empty set)
     if not self._points:
         return None
     p = self._points.data
     valid = np.isfinite(p[:,0]) * np.isfinite(p[:,1]) * np.isfinite(p[:,2])
     validpoints = p[valid, :]
     x1, y1, z1 = validpoints.min(axis=0)
     x2, y2, z2 = validpoints.max(axis=0)
     
     # There we are
     return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)
Ejemplo n.º 10
0
    def _GetLimits(self):
        """ Get the limits in world coordinates between which the object exists.
        """

        # Obtain untransformed coords (if not an empty set)
        if not self._points:
            return None
        p = self._points.data
        valid = np.isfinite(p[:, 0]) * np.isfinite(p[:, 1]) * np.isfinite(p[:,
                                                                            2])
        validpoints = p[valid, :]
        x1, y1, z1 = validpoints.min(axis=0)
        x2, y2, z2 = validpoints.max(axis=0)

        # There we are
        return Wobject._GetLimits(self, x1, x2, y1, y2, z1, z2)