fI have done my data analysis in ipython using pandas and ggplot, but now i would like to move this to a gui and thought to use pyqt.
To create a figure in pyqt i would usually use matplotlib, something along 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 pandas and ggplot. But this does not work
p = ggplot(mtcars, aes('mpg', 'qsec')) + geom_point(colour='steelblue')
ax.plot(p)
How can I plot a python ggplot figure in a pyqt program?
In the above p.draw() will return a matplotlib figure. You could use this figure to add a subplot and then pass this axis to pandas plot function or use matplotlibs plotting directly. Combining two ggplot plots (or any existing plot with a new ggplot plot) is currently not possible (see github.com/yhat/ggplot/issues/160 and github.com/yhat/ggplot/issues/181).