Ejemplo n.º 1
0
class X64PlotChart(X64PlotBase):
    """
    A chart widget for dreampy for non-interactive plots
    """
    def __init__(self, chart_prop=None, **kwargs):
        if chart_prop is None:
            chart_prop = ChartProperties()
        chart_prop.get_properties(kwargs)
        self.plotobj = ChartView(chart_prop, **kwargs)
        self.alive = True


    def savefig(self, filename, dpi=None, facecolor='w',
                edgecolor='w', orientation='portrait',
                format='png', transparent=False, bbox_inches=None,
                pad_inches=0.1):
        """
        saves the figure into a file
        """
        print "Saving figure to file %s" % filename
        self.plotobj.savefig(filename, dpi=dpi, facecolor=facecolor,
                             edgecolor=edgecolor, orientation=orientation,
                             format=format, transparent=transparent,
                             bbox_inches=bbox_inches, pad_inches=pad_inches)
Ejemplo n.º 2
0
 def __init__(self, chart_prop=None, **kwargs):
     if chart_prop is None:
         chart_prop = ChartProperties()
     chart_prop.get_properties(kwargs)
     self.plotobj = ChartView(chart_prop, **kwargs)
     self.alive = True