(self, context=None)
Redraws the plot
Redraws the plot
Redraws the plot
def redraw(self, context=None):
        """Redraws the plot"""
        ctx = context or self._ctx
        if self._background is not None:
            ctx.set_source_rgba(*self._background)
            ctx.rectangle(0, 0, self.bbox.width, self.bbox.height)
            ctx.fill()

        for obj, bbox, palette, opacity, args, kwds in self._objects:
            if palette is None:
                palette = getattr(obj, "_default_palette", self._palette)
            plotter = getattr(obj, "__plot__", None)
            if plotter is None:
                warn("%s does not support plotting" % (obj,))
            else:
                if opacity < 1.0:
                    ctx.push_group()
                else:
                    ctx.save()
                plotter(ctx, bbox, palette, *args, **kwds)
                if opacity < 1.0:
                    ctx.pop_group_to_source()
                    ctx.paint_with_alpha(opacity)
                else:
                    ctx.restore()

        self._is_dirty = False
def redraw ( self , context = None ) : ctx = context or self . _ctx if self . _background is not None : ctx . set_source_rgba ( * self . _background ) ctx . rectangle ( 0 , 0 , self . bbox . width , self . bbox . height ) ctx . fill ( ) for obj , bbox , palette , opacity , args , kwds in self . _objects : if palette is None : palette = getattr ( obj , "_default_palette" , self . _palette ) plotter = getattr ( obj , "__plot__" , None ) if plotter is None : warn ( "%s does not support plotting" % ( obj , ) ) else : if opacity < 1.0 : ctx . push_group ( ) else : ctx . save ( ) plotter ( ctx , bbox , palette , * args , * * kwds ) if opacity < 1.0 : ctx . pop_group_to_source ( ) ctx . paint_with_alpha ( opacity ) else : ctx . restore ( ) self . _is_dirty = False