[Matplotlib-users] using different backends for python 2.7 and 3.6

Slavin, Jonathan jslavin at cfa.harvard.edu
Fri May 5 11:03:56 EDT 2017


Hi,

I'm starting to make the transition from python 2.7.x to python 3.x
(currently 3.6).  I've found that for my python 3.6 installation (via
conda), the Qt4Agg backend doesn't work, but Qt5Agg does.  On the other
hand, for python 2.7, Qt4Agg works, but Qt5Agg doesn't.  Of course it would
be best if these issues were fixed (and there appear to be bug reports on
this) but until that happens, is there a recommended way to set the backend
other than editing the matplotlibrc file.  I tried setting the MPLBACKEND
environment variable, but that didn't seem to work. I like using ipython
--pylab, especially for quick plotting. I know I could start ipython and
then do
import matplotlib
matplotlib.use("Qt5Agg")
​etc., but that's kind of a pain.  Suggestions welcome.

Regards,
Jon​

-- 
________________________________________________________
Jonathan D. Slavin                 Harvard-Smithsonian CfA
jslavin at cfa.harvard.edu       60 Garden Street, MS 83
phone: (617) 496-7981       Cambridge, MA 02138-1516
cell: (781) 363-0035             USA
________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20170505/af82640b/attachment.html>


More information about the Matplotlib-users mailing list