Ejemplo n.º 1
0
 def set_value(self, value):
     """Accepts a camelot.container.chartcontainer.FigureContainer or a 
     camelot.container.chartcontainer.AxesContainer """
     from camelot.container.chartcontainer import structure_to_figure_container
     self._value = structure_to_figure_container(
         AbstractCustomEditor.set_value(self, value))
     self.on_draw()
Ejemplo n.º 2
0
 def set_value(self, value):
     """Accepts a camelot.container.chartcontainer.FigureContainer or a 
     camelot.container.chartcontainer.AxesContainer """
     from camelot.container.chartcontainer import structure_to_figure_container
     self._value = structure_to_figure_container(
         super(ChartEditor, self).set_value(value))
     self.on_draw()
Ejemplo n.º 3
0
 def show_fullscreen_chart(chart, parent):
     """
     :param chart: a chart container
     :return: the widget showing the chart, by default a LiteBoxView
     """
     from matplotlib.figure import Figure
     from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
     from camelot.view.controls.liteboxview import LiteBoxView
     from camelot.container.chartcontainer import structure_to_figure_container
     figure_container = structure_to_figure_container(chart)
     litebox = LiteBoxView(parent)
     fig = Figure(facecolor='#ffffff')
     canvas = FigureCanvas(fig)
     canvas.updateGeometry()
     figure_container.plot_on_figure(fig)
     proxy = QtGui.QGraphicsProxyWidget()
     proxy.setWidget(canvas)
     litebox.show_fullscreen_item(proxy)
     canvas.draw()
     return litebox
Ejemplo n.º 4
0
 def show_fullscreen_chart(chart, parent):
     """
     :param chart: a chart container
     :return: the widget showing the chart, by default a LiteBoxView
     """
     from matplotlib.figure import Figure
     from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
     from camelot.view.controls.liteboxview import LiteBoxView
     from camelot.container.chartcontainer import structure_to_figure_container
     figure_container = structure_to_figure_container( chart )
     litebox = LiteBoxView(parent)
     fig = Figure(facecolor='#ffffff')
     canvas = FigureCanvas(fig)
     canvas.updateGeometry()
     figure_container.plot_on_figure(fig)
     proxy = QtGui.QGraphicsProxyWidget()
     proxy.setWidget(canvas)
     litebox.show_fullscreen_item(proxy)
     canvas.draw()
     return litebox
Ejemplo n.º 5
0
 def __init__(self, chart):
     from camelot.container.chartcontainer import structure_to_figure_container
     super(ChartDocument, self).__init__()
     self.chart = structure_to_figure_container(chart)
Ejemplo n.º 6
0
 def set_value(self, value):
     """Accepts a camelot.container.chartcontainer.FigureContainer or a 
     camelot.container.chartcontainer.AxesContainer """
     from camelot.container.chartcontainer import structure_to_figure_container
     self._value = structure_to_figure_container( super(ChartEditor, self).set_value(value) )
     self.on_draw()
Ejemplo n.º 7
0
 def set_value(self, value):
     """Accepts a camelot.container.chartcontainer.FigureContainer or a 
     camelot.container.chartcontainer.AxesContainer """
     from camelot.container.chartcontainer import structure_to_figure_container
     self._value = structure_to_figure_container( AbstractCustomEditor.set_value( self, value ) )
     self.on_draw()
Ejemplo n.º 8
0
 def __init__( self, chart ):
     from camelot.container.chartcontainer import structure_to_figure_container
     super( ChartDocument, self ).__init__()
     self.chart = structure_to_figure_container( chart )