(self, *args, **kwargs)
Plot lines, curves, scatter plots, or any sequence of basic
        OpenGL primitives.
        
        Arguments:
        
          * x, y: 1D vectors of the same size with point coordinates, or
            2D arrays where each row is plotted as an independent plot.
            If only x is provided, then it contains the y coordinates and the
            x coordinates are assumed to be linearly spaced.
          * options: a string with shorcuts for the options: color and marker.
            The color can be any char among: `rgbycmkw`.
            The marker can be any char among: `,.+-|xo`. 
          * color: the color of the line(s), or a list/array of colors for each 
            independent primitive.
          * marker, or m: the type of the marker as a char, or a NxMx3 texture.
          * marker_size, or ms: the size of the marker.
          * thickness: None by default, or the thickness of the line.
          * primitive_type: the OpenGL primitive type of the visual. Can be:
          
              * `LINES`: a segment is rendered for each pair of successive
                points
              * `LINE_STRIP`: a sequence of segments from one point to the
                next.
              * `LINE_LOOP`: like `LINE_STRIP` but closed.
              * `POINTS`: each point is rendered as a pixel.
              * `TRIANGLES`: each successive triplet of points is rendered as
                a triangle.
              * `TRIANGLE_STRIP`: one triangle is rendered from a point to the
                next (i.e. successive triangles share two vertices out of
                three).
              * `TRIANGLE_FAN`: the first vertex is shared by all triangles.
Plot lines, curves, scatter plots, or any sequence of basic
        OpenGL primitives.
        
        Arguments:
        
          * x, y: 1D vectors of the same size with point coordinates, or
            2D arrays where each row is plotted as an independent plot.
            If only x is provided, then it contains the y coordinates and the
            x coordinates are assumed to be linearly spaced.
          * options: a string with shorcuts for the options: color and marker.
            The color can be any char among: `rgbycmkw`.
            The marker can be any char among: `,.+-|xo`. 
          * color: the color of the line(s), or a list/array of colors for each 
            independent primitive.
          * marker, or m: the type of the marker as a char, or a NxMx3 texture.
          * marker_size, or ms: the size of the marker.
          * thickness: None by default, or the thickness of the line.
          * primitive_type: the OpenGL primitive type of the visual. Can be:
          
              * `LINES`: a segment is rendered for each pair of successive
                points
              * `LINE_STRIP`: a sequence of segments from one point to the
                next.
              * `LINE_LOOP`: like `LINE_STRIP` but closed.
              * `POINTS`: each point is rendered as a pixel.
              * `TRIANGLES`: each successive triplet of points is rendered as
                a triangle.
              * `TRIANGLE_STRIP`: one triangle is rendered from a point to the
                next (i.e. successive triangles share two vertices out of
                three).
              * `TRIANGLE_FAN`: the first vertex is shared by all triangles.
Plot lines curves scatter plots or any sequence of basic OpenGL primitives . Arguments : * x y : 1D vectors of the same size with point coordinates or 2D arrays where each row is plotted as an independent plot . If only x is provided then it contains the y coordinates and the x coordinates are assumed to be linearly spaced . * options : a string with shorcuts for the options : color and marker . The color can be any char among : rgbycmkw . The marker can be any char among : . + - |xo . * color : the color of the line ( s ) or a list / array of colors for each independent primitive . * marker or m : the type of the marker as a char or a NxMx3 texture . * marker_size or ms : the size of the marker . * thickness : None by default or the thickness of the line . * primitive_type : the OpenGL primitive type of the visual . Can be : * LINES : a segment is rendered for each pair of successive points * LINE_STRIP : a sequence of segments from one point to the next . * LINE_LOOP : like LINE_STRIP but closed . * POINTS : each point is rendered as a pixel . * TRIANGLES : each successive triplet of points is rendered as a triangle . * TRIANGLE_STRIP : one triangle is rendered from a point to the next ( i . e . successive triangles share two vertices out of three ) . * TRIANGLE_FAN : the first vertex is shared by all triangles .
def plot(self, *args, **kwargs):
        """Plot lines, curves, scatter plots, or any sequence of basic
        OpenGL primitives.
        
        Arguments:
        
          * x, y: 1D vectors of the same size with point coordinates, or
            2D arrays where each row is plotted as an independent plot.
            If only x is provided, then it contains the y coordinates and the
            x coordinates are assumed to be linearly spaced.
          * options: a string with shorcuts for the options: color and marker.
            The color can be any char among: `rgbycmkw`.
            The marker can be any char among: `,.+-|xo`. 
          * color: the color of the line(s), or a list/array of colors for each 
            independent primitive.
          * marker, or m: the type of the marker as a char, or a NxMx3 texture.
          * marker_size, or ms: the size of the marker.
          * thickness: None by default, or the thickness of the line.
          * primitive_type: the OpenGL primitive type of the visual. Can be:
          
              * `LINES`: a segment is rendered for each pair of successive
                points
              * `LINE_STRIP`: a sequence of segments from one point to the
                next.
              * `LINE_LOOP`: like `LINE_STRIP` but closed.
              * `POINTS`: each point is rendered as a pixel.
              * `TRIANGLES`: each successive triplet of points is rendered as
                a triangle.
              * `TRIANGLE_STRIP`: one triangle is rendered from a point to the
                next (i.e. successive triangles share two vertices out of
                three).
              * `TRIANGLE_FAN`: the first vertex is shared by all triangles.
        
        """
        # deal with special string argument containing options
        lenargs = len(args)
        opt = ''
        # we look for the index in args such that args[i] is a string
        for i in xrange(lenargs):
            if isinstance(args[i], basestring):
                opt = args[i]
                break
        if opt:
            # we remove the options from the arguments
            l = list(args)
            l.remove(opt)
            args = tuple(l)
            kwargs['options'] = opt
        
        # process marker type, 'o' or 'or'
        marker = kwargs.pop('marker', kwargs.pop('m', None))
        if marker is None:
            if opt and opt[0] in ',.+-|xo':
                marker = opt[0]
        if marker is not None:
            cls = vs.SpriteVisual
            texsize = kwargs.pop('marker_size', kwargs.pop('ms', None))
            # marker string
            if isinstance(marker, basestring): 
                kwargs['texture'] = get_marker_texture(marker, texsize)
            # or custom texture marker
            else:
                kwargs['texture'] = marker
            kwargs.pop('options', None)
            # process marker color in options
            if 'color' not in kwargs and len(opt) == 2:
                kwargs['color'] = get_color(opt[1])
        else:
            cls = vs.PlotVisual
        
        self.add_visual(cls, *args, **kwargs)
def plot ( self , * args , * * kwargs ) : # deal with special string argument containing options lenargs = len ( args ) opt = '' # we look for the index in args such that args[i] is a string for i in xrange ( lenargs ) : if isinstance ( args [ i ] , basestring ) : opt = args [ i ] break if opt : # we remove the options from the arguments l = list ( args ) l . remove ( opt ) args = tuple ( l ) kwargs [ 'options' ] = opt # process marker type, 'o' or 'or' marker = kwargs . pop ( 'marker' , kwargs . pop ( 'm' , None ) ) if marker is None : if opt and opt [ 0 ] in ',.+-|xo' : marker = opt [ 0 ] if marker is not None : cls = vs . SpriteVisual texsize = kwargs . pop ( 'marker_size' , kwargs . pop ( 'ms' , None ) ) # marker string if isinstance ( marker , basestring ) : kwargs [ 'texture' ] = get_marker_texture ( marker , texsize ) # or custom texture marker else : kwargs [ 'texture' ] = marker kwargs . pop ( 'options' , None ) # process marker color in options if 'color' not in kwargs and len ( opt ) == 2 : kwargs [ 'color' ] = get_color ( opt [ 1 ] ) else : cls = vs . PlotVisual self . add_visual ( cls , * args , * * kwargs )