If it fixed your problem to call a different back-end, you can make this a permanent change by changing the matplotlibrc
file.
Unfortunately, I'm not sure where this file would be in windows.
When you do find it, line 32 sets the back-end used:
#### CONFIGURATION BEGINS HERE
# the default backend; one of GTK GTKAgg GTKCairo GTK3Agg GTK3Cairo
# CocoaAgg FltkAgg MacOSX QtAgg Qt4Agg TkAgg WX WXAgg Agg Cairo GDK PS
# PDF SVG Template
# You can also deploy your own backend outside of matplotlib by
# referring to the module name (which must be in the PYTHONPATH) as
# 'module://my_backend'
backend : <Whatever works for you>
This will allow you to run it from a file - outside of ipython