I need to embed a pyplot into a Pyform. Came across the ControlMatplotlib control but have struggled to get it to work. I am not sure what to set the value to.
class SimpleExample(BaseWidget):
def __init__(self):
super(SimpleExample, self).__init__('Simple example')
self._graph = ControlMatplotlib("plot")
self.formset = [' ', (' ', '_graph', ' '), ' ']
X = [i for i in range(0,100,2)]
Y = [i for i in range(0,150,3)]
pplot.scatter(X, Y)
self._graph.value = ??
self._graph.draw()
Any insight is greatly appreciated.