Skip to content

Commit

Permalink
matplotlib needs Qt5Agg backend in Ubuntu 16.04
Browse files Browse the repository at this point in the history
  • Loading branch information
ahundt committed Jan 2, 2017
1 parent 3bae055 commit 17220c0
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion python/gps/gps_main.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
""" This file defines the main object that runs experiments. """

import matplotlib as mpl
mpl.use('Qt4Agg')
qt_found=False
try:
import PyQt4
mpl.use('Qt4Agg')
qt_found = True
except ImportError:
qt_found = False
if qt_found == False:
try:
import PyQt5
mpl.use('Qt5Agg')
qt_found = True
except ImportError:
qt_found = False

import logging
import imp
Expand Down

0 comments on commit 17220c0

Please sign in to comment.