From 3d86fa3a331710d76b563c540360ce50e804847d Mon Sep 17 00:00:00 2001 From: Alexander Clausen Date: Tue, 12 Mar 2019 15:32:20 +0100 Subject: [PATCH] Use nipy_spectral colormap cm.spectral was renamed a while ago to cm.nipy_spectral with a deprecation warning, and the original name was later removed. This makes the writeData script work with current matplotlib versions. It should also be compatible with older releases, as the nipy_spectral alias was created in version 1.3, released in 2013. --- writeData.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/writeData.py b/writeData.py index 0050f57..a39cd1b 100755 --- a/writeData.py +++ b/writeData.py @@ -35,7 +35,7 @@ def drawGraphic(data, figure, xLabel = None, yLabel = None, title = None, logPlo norm = None subplot = figure.add_subplot(111) - pic = subplot.imshow(data, norm=norm, aspect="auto", cmap=cm.spectral, extent=extent) + pic = subplot.imshow(data, norm=norm, aspect="auto", cmap=cm.nipy_spectral, extent=extent) if xLabel: plt.xlabel(xLabel, fontsize=20)