Mercurial > hg > nsaunier > traffic-intelligence
comparison python/utils.py @ 847:36c5bee9a887
bug correction
| author | Nicolas Saunier <nicolas.saunier@polymtl.ca> |
|---|---|
| date | Wed, 20 Jul 2016 17:52:40 -0400 |
| parents | 90b7d6e19c55 |
| children | 33d296984dd8 |
comparison
equal
deleted
inserted
replaced
| 846:37d14818db89 | 847:36c5bee9a887 |
|---|---|
| 348 if plotFigure: | 348 if plotFigure: |
| 349 fig = plt.figure(figsize=(4+0.4*c.shape[0], 0.4*c.shape[0])) | 349 fig = plt.figure(figsize=(4+0.4*c.shape[0], 0.4*c.shape[0])) |
| 350 fig.add_subplot(1,1,1) | 350 fig.add_subplot(1,1,1) |
| 351 #plt.imshow(np.fabs(c), interpolation='none') | 351 #plt.imshow(np.fabs(c), interpolation='none') |
| 352 plt.imshow(c, vmin=-1., vmax = 1., interpolation='none', cmap = 'RdYlBu_r') # coolwarm | 352 plt.imshow(c, vmin=-1., vmax = 1., interpolation='none', cmap = 'RdYlBu_r') # coolwarm |
| 353 colnames = [displayNames.get(s.strip(), s.strip()) for s in columns] | 353 if displayNames is not None: |
| 354 colnames = [displayNames.get(s.strip(), s.strip()) for s in columns] | |
| 355 else: | |
| 356 colnames = columns | |
| 354 #correlation.plot_corr(c, xnames = colnames, normcolor=True, title = filename) | 357 #correlation.plot_corr(c, xnames = colnames, normcolor=True, title = filename) |
| 355 plt.xticks(range(len(colnames)), colnames, rotation=90) | 358 plt.xticks(range(len(colnames)), colnames, rotation=90) |
| 356 plt.yticks(range(len(colnames)), colnames) | 359 plt.yticks(range(len(colnames)), colnames) |
| 357 plt.tick_params('both', length=0) | 360 plt.tick_params('both', length=0) |
| 358 plt.subplots_adjust(bottom = 0.29) | 361 plt.subplots_adjust(bottom = 0.29) |
