How can I place a python gglot figure in a gui? -
The FI has analyzed my data in IPython using pandos and giziplot, but now I take it to a GUI Wish and thought to use Pyqt
To create a shape in pyqt, I will usually use some matplotlib with these lines.
import matplotlib.pyplot as plt figure = plt. Figure () Figure.add_subplot (111) ax.plot (data, '* -')
But I would like to use the integration between Pando and Gjiplot but this does not work
p = ggplot (mtcars, aes ('mpg', 'qsec')) + geom_point (color = 'steelblue') ax.plot (p)
How can I create a python ggplot shape in a pyqt program?
A matplotlib shape will return to p.draw () above. You can use this shape to add a subplot and then you can pass this axis into the pandas plot function or use the plotting platelets directly. The combination of two ggplot plots (or any existing conspiracy with a new ggplot plot) is currently not possible (see github.com/yhat/ggplot/issues/160 and github.com/yhat/ggplot/issues/181).
Comments
Post a Comment