Hello, I'm developing a plugin in pygtk, which
> indirectly (via networkx) uses matplotlib to display
> graphs.
> Now, I have the following problem: When I import pylab,
> my window icon (the small icon in the window decoration)
> gets replaced by the matplotlib icon. I pasted a sample
> script below to illustrate.
> This is amazingly annoying for me since I am merely
> writing a plugin for an existing application and cannot
> simply replace the original window icon.
> Is there any way to supress this behaviour?
You can comment out the code in backends/backend_gtk.py
try:
gtk.window_set_default_icon_from_file (
os.path.join (matplotlib.rcParams['datapath'], 'matplotlib.svg'))
except:
verbose.report('Could not load matplotlib icon: %s' % sys.exc_info()[1])
or physically remove the icon in which case you'll just get a report
that it is missing.
You can also set the icon yourself after import matplotlib/backend_gtk
using the same code.