Example #1
0
    def print_figure(self,
                     filename,
                     dpi=None,
                     facecolor='w',
                     edgecolor='w',
                     orientation='portrait',
                     **kwargs):
        if DEBUG: print 'FigureCanvasGTKAgg.print_figure'
        # delete the renderer to prevent improper blitting after print

        if dpi is None: dpi = matplotlib.rcParams['savefig.dpi']
        root, ext = os.path.splitext(filename)
        ext = ext.lower()[1:]
        if ext == 'jpg':
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor,
                                         edgecolor, orientation, **kwargs)

        else:
            agg = self.switch_backends(FigureCanvasAgg)
            try:
                agg.print_figure(filename, dpi, facecolor, edgecolor,
                                 orientation, **kwargs)
            except IOError, msg:
                error_msg_gtk('Failed to save\nError message: %s' % (msg, ),
                              self)
Example #2
0
    def print_figure(self, filename, dpi=150,
                     facecolor='w', edgecolor='w',
                     orientation='portrait'):
        if DEBUG: print 'FigureCanvasGTKAgg.print_figure'
        # delete the renderer to prevent improper blitting after print

        root, ext = os.path.splitext(filename)       
        ext = ext.lower()[1:]
        if ext == 'jpg':
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor,
                                         edgecolor, orientation)
            
        else:
            agg = self.switch_backends(FigureCanvasAgg)
            agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
Example #3
0
    def print_figure(self, filename, dpi=150,
                     facecolor='w', edgecolor='w',
                     orientation='portrait'):
        if DEBUG: print 'FigureCanvasGTKAgg.print_figure'
        # delete the renderer to prevent improper blitting after print

        root, ext = os.path.splitext(filename)       
        ext = ext.lower()[1:]
        if ext == 'jpg':
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor,
                                         edgecolor, orientation)
            
        else:
            agg = self.switch_backends(FigureCanvasAgg)
            agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
Example #4
0
    def print_figure(self, filename, dpi=150, facecolor="w", edgecolor="w", orientation="portrait"):
        if DEBUG:
            print "FigureCanvasGTKAgg.print_figure"
        # delete the renderer to prevent improper blitting after print

        root, ext = os.path.splitext(filename)
        ext = ext.lower()[1:]
        if ext == "jpg":
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor, edgecolor, orientation)

        else:
            agg = self.switch_backends(FigureCanvasAgg)
            agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)

        self.figure.set_canvas(self)
Example #5
0
    def print_figure(self, filename, dpi=150,
                     facecolor='w', edgecolor='w',
                     orientation='portrait'):
        if DEBUG: print 'FigureCanvasGTKAgg.print_figure'
        # delete the renderer to prevent improper blitting after print

        root, ext = os.path.splitext(filename)       
        ext = ext.lower()[1:]
        if ext == 'jpg':
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor,
                                         edgecolor, orientation)
            
        else:
            agg = self.switch_backends(FigureCanvasAgg)
            try: agg.print_figure(filename, dpi, facecolor, edgecolor, orientation)
            except IOError, msg:
                error_msg_gtk('Failed to save\nError message: %s'%(msg,), self)
Example #6
0
    def print_figure(self, filename, dpi=None, facecolor="w", edgecolor="w", orientation="portrait", **kwargs):
        if DEBUG:
            print "FigureCanvasGTKAgg.print_figure"
        # delete the renderer to prevent improper blitting after print

        if dpi is None:
            dpi = matplotlib.rcParams["savefig.dpi"]
        root, ext = os.path.splitext(filename)
        ext = ext.lower()[1:]
        if ext == "jpg":
            FigureCanvasGTK.print_figure(self, filename, dpi, facecolor, edgecolor, orientation, **kwargs)

        else:
            agg = self.switch_backends(FigureCanvasAgg)
            try:
                agg.print_figure(filename, dpi, facecolor, edgecolor, orientation, **kwargs)
            except IOError, msg:
                error_msg_gtk("Failed to save\nError message: %s" % (msg,), self)