changeset 847:36c5bee9a887

bug correction
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 20 Jul 2016 17:52:40 -0400
parents 37d14818db89
children 0cb69238e6f5
files python/utils.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/python/utils.py	Fri Jul 15 16:31:37 2016 -0400
+++ b/python/utils.py	Wed Jul 20 17:52:40 2016 -0400
@@ -350,7 +350,10 @@
         fig.add_subplot(1,1,1)
         #plt.imshow(np.fabs(c), interpolation='none')
         plt.imshow(c, vmin=-1., vmax = 1., interpolation='none', cmap = 'RdYlBu_r') # coolwarm
-        colnames = [displayNames.get(s.strip(), s.strip()) for s in columns]
+        if displayNames is not None:
+            colnames = [displayNames.get(s.strip(), s.strip()) for s in columns]
+        else:
+            colnames = columns
         #correlation.plot_corr(c, xnames = colnames, normcolor=True, title = filename)
         plt.xticks(range(len(colnames)), colnames, rotation=90)
         plt.yticks(range(len(colnames)), colnames)