Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a32dd09

Browse files
committed
Merge pull request #496 from dmcdougall/master
Added Carey Rappaport's CMRmap colour map
2 parents 65b773d + 85a26dc commit a32dd09

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

lib/matplotlib/_cm.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1736,6 +1736,36 @@ def gfunc32(x):
17361736
(1.0, 0.150232812, 0.150232812)]
17371737
}
17381738

1739+
# Implementation of Carey Rappaport's CMRmap.
1740+
# See `A Color Map for Effective Black-and-White Rendering of Color-Scale Images' by Carey Rappaport
1741+
# http://www.mathworks.com/matlabcentral/fileexchange/2662-cmrmap-m
1742+
_CMRmap_data = {'red' : ( (0.000, 0.00, 0.00),
1743+
(0.125, 0.15, 0.15),
1744+
(0.250, 0.30, 0.30),
1745+
(0.375, 0.60, 0.60),
1746+
(0.500, 1.00, 1.00),
1747+
(0.625, 0.90, 0.90),
1748+
(0.750, 0.90, 0.90),
1749+
(0.875, 0.90, 0.90),
1750+
(1.000, 1.00, 1.00) ),
1751+
'green' : ( (0.000, 0.00, 0.00),
1752+
(0.125, 0.15, 0.15),
1753+
(0.250, 0.15, 0.15),
1754+
(0.375, 0.20, 0.20),
1755+
(0.500, 0.25, 0.25),
1756+
(0.625, 0.50, 0.50),
1757+
(0.750, 0.75, 0.75),
1758+
(0.875, 0.90, 0.90),
1759+
(1.000, 1.00, 1.00) ),
1760+
'blue': ( (0.000, 0.00, 0.00),
1761+
(0.125, 0.50, 0.50),
1762+
(0.250, 0.75, 0.75),
1763+
(0.375, 0.50, 0.50),
1764+
(0.500, 0.15, 0.15),
1765+
(0.625, 0.00, 0.00),
1766+
(0.750, 0.10, 0.10),
1767+
(0.875, 0.50, 0.50),
1768+
(1.000, 1.00, 1.00) )}
17391769

17401770
datad = {
17411771
'afmhot': _afmhot_data,
@@ -1744,6 +1774,7 @@ def gfunc32(x):
17441774
'binary': _binary_data,
17451775
'bwr': _bwr_data,
17461776
'brg': _brg_data,
1777+
'CMRmap': _CMRmap_data,
17471778
'cool': _cool_data,
17481779
'copper': _copper_data,
17491780
'cubehelix': _cubehelix_data,

0 commit comments

Comments
 (0)