We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 46ad899 + 59de6e6 commit f5a9ee4Copy full SHA for f5a9ee4
axelrod/plot.py
@@ -1,4 +1,5 @@
1
from numpy import arange, median, nan_to_num
2
+import warnings
3
4
matplotlib_installed = True
5
try:
@@ -8,6 +9,12 @@
8
9
from mpl_toolkits.axes_grid1 import make_axes_locatable
10
except ImportError:
11
matplotlib_installed = False
12
+except RuntimeError:
13
+ matplotlib_installed = False
14
+ warnings.warn(
15
+ 'Matplotlib failed to import and so no plots will be produced. This ' +
16
+ 'could be caused by using a virtual environment on OSX. See ' +
17
+ 'http://matplotlib.org/faq/virtualenv_faq.html for details.')
18
19
20
def default_cmap():
0 commit comments