I am trying to utilize some of the functionality that pyplot provides to
display some data related to the graph, but on a separate window.
The problem I have is that the pyplot window that pops up is uncontrollable,
in other words I can not utilize any of the default buttons, or even close
it.
The code I use is very simple:
plt.ion()
fig = plt.figure()
ax = self.fig.add_subplot(111)
x = np.random.normal(0,1,1000)
numBins = 50
ax.hist(x,numBins,color='green',alpha=0.8)
Any ideas what is going on? Can it be that Gtk and pyplot don't work well
together?
I am 100% sure it has nothing to do with the graph tool but rather with Gtk
backend. I should have probably mentioned that in my first email.
The only reason I posted it on the mailing list was because I am sure I
can't be the only one who wants to use pyplot from a Gtk-based app that
uses the graph-tool.
So I was kinda looking for some hints, if anybody has any.
You might want to try asking matplotlib to use another backend : (ex qt4)
import matplotlib
matplotlib.use('QT4Agg')
or, as graph_tool uses gtk3 if I remember correctly, you try to force
the import of gtk, see if it helps... (maybe you have two versions of
gtk that generate conflicts)
Do you import the drawing canvas as a widget to a Gtk window or do you use
it directly as is (i.e. invoke plot() and be done with it?)
And if you don't mind me asking, which backend are you using, GtkAgg?