summaryrefslogtreecommitdiff
path: root/silx/gui/plot/matplotlib
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-05-28 08:16:16 +0200
committerPicca Frédéric-Emmanuel <picca@synchrotron-soleil.fr>2019-05-28 08:16:16 +0200
commita763e5d1b3921b3194f3d4e94ab9de3fbe08bbdd (patch)
tree45d462ed36a5522e9f3b9fde6c4ec4918c2ae8e3 /silx/gui/plot/matplotlib
parentcebdc9244c019224846cb8d2668080fe386a6adc (diff)
New upstream version 0.10.1+dfsg
Diffstat (limited to 'silx/gui/plot/matplotlib')
-rw-r--r--silx/gui/plot/matplotlib/Colormap.py16
1 files changed, 15 insertions, 1 deletions
diff --git a/silx/gui/plot/matplotlib/Colormap.py b/silx/gui/plot/matplotlib/Colormap.py
index 772a473..38f3b55 100644
--- a/silx/gui/plot/matplotlib/Colormap.py
+++ b/silx/gui/plot/matplotlib/Colormap.py
@@ -29,7 +29,13 @@ from matplotlib.colors import ListedColormap
import matplotlib.colors
import matplotlib.cm
import silx.resources
-from silx.utils.deprecation import deprecated
+from silx.utils.deprecation import deprecated, deprecated_warning
+
+
+deprecated_warning(type_='module',
+ name=__file__,
+ replacement='silx.gui.colors.Colormap',
+ since_version='0.10.0')
_logger = logging.getLogger(__name__)
@@ -46,25 +52,30 @@ _CMAPS = {}
@property
+@deprecated(since_version='0.10.0')
def magma():
return getColormap('magma')
@property
+@deprecated(since_version='0.10.0')
def inferno():
return getColormap('inferno')
@property
+@deprecated(since_version='0.10.0')
def plasma():
return getColormap('plasma')
@property
+@deprecated(since_version='0.10.0')
def viridis():
return getColormap('viridis')
+@deprecated(since_version='0.10.0')
def getColormap(name):
"""Returns matplotlib colormap corresponding to given name
@@ -143,6 +154,7 @@ def getColormap(name):
return matplotlib.cm.get_cmap(name)
+@deprecated(since_version='0.10.0')
def getScalarMappable(colormap, data=None):
"""Returns matplotlib ScalarMappable corresponding to colormap
@@ -223,6 +235,8 @@ def applyColormapToData(data, colormap):
return rgbaImage
+@deprecated(replacement='silx.colors.Colormap.getSupportedColormaps',
+ since_version='0.10.0')
def getSupportedColormaps():
"""Get the supported colormap names as a tuple of str.
"""