diff --git a/doc/api/api_changes/qualitative colormaps.rst b/doc/api/api_changes/qualitative colormaps.rst new file mode 100644 index 000000000000..4cafdbce8bcf --- /dev/null +++ b/doc/api/api_changes/qualitative colormaps.rst @@ -0,0 +1,11 @@ +Qualitative colormaps +--------------------- + +Colorbrewer's qualitative/discrete colormaps ("Accent", "Dark2", "Paired", +"Pastel1", "Pastel2", "Set1", "Set2", "Set3") are now implemented as +``ListedColormap`` instead of ``LinearSegmentedColormap``. + +To use these for images where categories are specified as integers, for +instance, use:: + + plt.imshow(x, cmap='Dark2', norm=colors.NoNorm()) diff --git a/doc/users/whats_new/qualitative colormaps.rst b/doc/users/whats_new/qualitative colormaps.rst new file mode 100644 index 000000000000..1906a4fdd2c7 --- /dev/null +++ b/doc/users/whats_new/qualitative colormaps.rst @@ -0,0 +1,9 @@ +Qualitative colormaps +--------------------- + +ColorBrewer's "qualitative" colormaps ("Accent", "Dark2", "Paired", +"Pastel1", "Pastel2", "Set1", "Set2", "Set3") were intended for discrete +categorical data, with no implication of value, and therefore have been +converted to ``ListedColormap`` instead of ``LinearSegmentedColormap``, so +the colors will no longer be interpolated and they can be used for +choropleths, labeled image features, etc. diff --git a/lib/matplotlib/_cm.py b/lib/matplotlib/_cm.py index 7624b8a88bab..7f2f6b1ea913 100644 --- a/lib/matplotlib/_cm.py +++ b/lib/matplotlib/_cm.py @@ -2,7 +2,8 @@ Nothing here but dictionaries for generating LinearSegmentedColormaps, and a dictionary of these dictionaries. -Documentation for each is in pyplot.colormaps() +Documentation for each is in pyplot.colormaps(). Please update this +with the purpose and type of your colormap if you add data for one here. """ from __future__ import (absolute_import, division, print_function, @@ -509,1095 +510,452 @@ def gfunc32(x): # LICENSE_COLORBREWER in the license directory of the matplotlib # source distribution). -_Accent_data = {'blue': [(0.0, 0.49803921580314636, -0.49803921580314636), (0.14285714285714285, 0.83137255907058716, -0.83137255907058716), (0.2857142857142857, 0.52549022436141968, -0.52549022436141968), (0.42857142857142855, 0.60000002384185791, -0.60000002384185791), (0.5714285714285714, 0.69019609689712524, -0.69019609689712524), (0.7142857142857143, 0.49803921580314636, -0.49803921580314636), (0.8571428571428571, 0.090196080505847931, -0.090196080505847931), (1.0, 0.40000000596046448, -0.40000000596046448)], - - 'green': [(0.0, 0.78823530673980713, 0.78823530673980713), - (0.14285714285714285, 0.68235296010971069, 0.68235296010971069), - (0.2857142857142857, 0.75294119119644165, 0.75294119119644165), - (0.42857142857142855, 1.0, 1.0), (0.5714285714285714, - 0.42352941632270813, 0.42352941632270813), (0.7142857142857143, - 0.0078431377187371254, 0.0078431377187371254), - (0.8571428571428571, 0.35686275362968445, 0.35686275362968445), - (1.0, 0.40000000596046448, 0.40000000596046448)], - - 'red': [(0.0, 0.49803921580314636, 0.49803921580314636), - (0.14285714285714285, 0.7450980544090271, 0.7450980544090271), - (0.2857142857142857, 0.99215686321258545, 0.99215686321258545), - (0.42857142857142855, 1.0, 1.0), (0.5714285714285714, - 0.21960784494876862, 0.21960784494876862), (0.7142857142857143, - 0.94117647409439087, 0.94117647409439087), (0.8571428571428571, - 0.74901962280273438, 0.74901962280273438), (1.0, - 0.40000000596046448, 0.40000000596046448)]} - -_Blues_data = {'blue': [(0.0, 1.0, 1.0), (0.125, 0.9686274528503418, -0.9686274528503418), (0.25, 0.93725490570068359, 0.93725490570068359), -(0.375, 0.88235294818878174, 0.88235294818878174), (0.5, -0.83921569585800171, 0.83921569585800171), (0.625, 0.7764706015586853, -0.7764706015586853), (0.75, 0.70980393886566162, 0.70980393886566162), -(0.875, 0.61176472902297974, 0.61176472902297974), (1.0, -0.41960784792900085, 0.41960784792900085)], - - 'green': [(0.0, 0.9843137264251709, 0.9843137264251709), (0.125, - 0.92156863212585449, 0.92156863212585449), (0.25, - 0.85882353782653809, 0.85882353782653809), (0.375, - 0.7921568751335144, 0.7921568751335144), (0.5, - 0.68235296010971069, 0.68235296010971069), (0.625, - 0.57254904508590698, 0.57254904508590698), (0.75, - 0.44313725829124451, 0.44313725829124451), (0.875, - 0.31764706969261169, 0.31764706969261169), (1.0, - 0.18823529779911041, 0.18823529779911041)], - - 'red': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.87058824300765991, 0.87058824300765991), (0.25, - 0.7764706015586853, 0.7764706015586853), (0.375, - 0.61960786581039429, 0.61960786581039429), (0.5, - 0.41960784792900085, 0.41960784792900085), (0.625, - 0.25882354378700256, 0.25882354378700256), (0.75, - 0.12941177189350128, 0.12941177189350128), (0.875, - 0.031372550874948502, 0.031372550874948502), (1.0, - 0.031372550874948502, 0.031372550874948502)]} - -_BrBG_data = {'blue': [(0.0, 0.019607843831181526, -0.019607843831181526), (0.10000000000000001, 0.039215687662363052, -0.039215687662363052), (0.20000000000000001, 0.17647059261798859, -0.17647059261798859), (0.29999999999999999, 0.49019607901573181, -0.49019607901573181), (0.40000000000000002, 0.76470589637756348, -0.76470589637756348), (0.5, 0.96078431606292725, 0.96078431606292725), -(0.59999999999999998, 0.89803922176361084, 0.89803922176361084), -(0.69999999999999996, 0.75686275959014893, 0.75686275959014893), -(0.80000000000000004, 0.56078433990478516, 0.56078433990478516), -(0.90000000000000002, 0.36862745881080627, 0.36862745881080627), (1.0, -0.18823529779911041, 0.18823529779911041)], - - 'green': [(0.0, 0.18823529779911041, 0.18823529779911041), - (0.10000000000000001, 0.31764706969261169, 0.31764706969261169), - (0.20000000000000001, 0.5058823823928833, 0.5058823823928833), - (0.29999999999999999, 0.7607843279838562, 0.7607843279838562), - (0.40000000000000002, 0.90980392694473267, 0.90980392694473267), - (0.5, 0.96078431606292725, 0.96078431606292725), - (0.59999999999999998, 0.91764706373214722, 0.91764706373214722), - (0.69999999999999996, 0.80392158031463623, 0.80392158031463623), - (0.80000000000000004, 0.59215688705444336, 0.59215688705444336), - (0.90000000000000002, 0.40000000596046448, 0.40000000596046448), - (1.0, 0.23529411852359772, 0.23529411852359772)], - - 'red': [(0.0, 0.32941177487373352, 0.32941177487373352), - (0.10000000000000001, 0.54901963472366333, 0.54901963472366333), - (0.20000000000000001, 0.74901962280273438, 0.74901962280273438), - (0.29999999999999999, 0.87450981140136719, 0.87450981140136719), - (0.40000000000000002, 0.96470588445663452, 0.96470588445663452), - (0.5, 0.96078431606292725, 0.96078431606292725), - (0.59999999999999998, 0.78039216995239258, 0.78039216995239258), - (0.69999999999999996, 0.50196081399917603, 0.50196081399917603), - (0.80000000000000004, 0.20784313976764679, 0.20784313976764679), - (0.90000000000000002, 0.0039215688593685627, - 0.0039215688593685627), (1.0, 0.0, 0.0)]} - -_BuGn_data = {'blue': [(0.0, 0.99215686321258545, -0.99215686321258545), (0.125, 0.97647058963775635, -0.97647058963775635), (0.25, 0.90196079015731812, -0.90196079015731812), (0.375, 0.78823530673980713, -0.78823530673980713), (0.5, 0.64313727617263794, 0.64313727617263794), -(0.625, 0.46274510025978088, 0.46274510025978088), (0.75, -0.27058824896812439, 0.27058824896812439), (0.875, -0.17254902422428131, 0.17254902422428131), (1.0, 0.10588235408067703, -0.10588235408067703)], - - 'green': [(0.0, 0.98823529481887817, 0.98823529481887817), (0.125, - 0.96078431606292725, 0.96078431606292725), (0.25, - 0.92549020051956177, 0.92549020051956177), (0.375, - 0.84705883264541626, 0.84705883264541626), (0.5, - 0.7607843279838562, 0.7607843279838562), (0.625, - 0.68235296010971069, 0.68235296010971069), (0.75, - 0.54509806632995605, 0.54509806632995605), (0.875, - 0.42745098471641541, 0.42745098471641541), (1.0, - 0.26666668057441711, 0.26666668057441711)], 'red': [(0.0, - 0.9686274528503418, 0.9686274528503418), (0.125, - 0.89803922176361084, 0.89803922176361084), (0.25, - 0.80000001192092896, 0.80000001192092896), (0.375, - 0.60000002384185791, 0.60000002384185791), (0.5, - 0.40000000596046448, 0.40000000596046448), (0.625, - 0.25490197539329529, 0.25490197539329529), (0.75, - 0.13725490868091583, 0.13725490868091583), (0.875, 0.0, 0.0), - (1.0, 0.0, 0.0)]} - -_BuPu_data = {'blue': [(0.0, 0.99215686321258545, -0.99215686321258545), (0.125, 0.95686274766921997, -0.95686274766921997), (0.25, 0.90196079015731812, -0.90196079015731812), (0.375, 0.85490196943283081, -0.85490196943283081), (0.5, 0.7764706015586853, 0.7764706015586853), -(0.625, 0.69411766529083252, 0.69411766529083252), (0.75, -0.61568629741668701, 0.61568629741668701), (0.875, -0.48627451062202454, 0.48627451062202454), (1.0, 0.29411765933036804, -0.29411765933036804)], - - 'green': [(0.0, 0.98823529481887817, 0.98823529481887817), (0.125, - 0.92549020051956177, 0.92549020051956177), (0.25, - 0.82745099067687988, 0.82745099067687988), (0.375, - 0.73725491762161255, 0.73725491762161255), (0.5, - 0.58823531866073608, 0.58823531866073608), (0.625, - 0.41960784792900085, 0.41960784792900085), (0.75, - 0.25490197539329529, 0.25490197539329529), (0.875, - 0.058823529630899429, 0.058823529630899429), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.87843137979507446, 0.87843137979507446), (0.25, - 0.74901962280273438, 0.74901962280273438), (0.375, - 0.61960786581039429, 0.61960786581039429), (0.5, - 0.54901963472366333, 0.54901963472366333), (0.625, - 0.54901963472366333, 0.54901963472366333), (0.75, - 0.53333336114883423, 0.53333336114883423), (0.875, - 0.5058823823928833, 0.5058823823928833), (1.0, - 0.30196079611778259, 0.30196079611778259)]} - -_Dark2_data = {'blue': [(0.0, 0.46666666865348816, -0.46666666865348816), (0.14285714285714285, 0.0078431377187371254, -0.0078431377187371254), (0.2857142857142857, 0.70196080207824707, -0.70196080207824707), (0.42857142857142855, 0.54117649793624878, -0.54117649793624878), (0.5714285714285714, 0.11764705926179886, -0.11764705926179886), (0.7142857142857143, 0.0078431377187371254, -0.0078431377187371254), (0.8571428571428571, 0.11372549086809158, -0.11372549086809158), (1.0, 0.40000000596046448, -0.40000000596046448)], - - 'green': [(0.0, 0.61960786581039429, 0.61960786581039429), - (0.14285714285714285, 0.37254902720451355, 0.37254902720451355), - (0.2857142857142857, 0.43921568989753723, 0.43921568989753723), - (0.42857142857142855, 0.16078431904315948, 0.16078431904315948), - (0.5714285714285714, 0.65098041296005249, 0.65098041296005249), - (0.7142857142857143, 0.67058825492858887, 0.67058825492858887), - (0.8571428571428571, 0.46274510025978088, 0.46274510025978088), - (1.0, 0.40000000596046448, 0.40000000596046448)], - - 'red': [(0.0, 0.10588235408067703, 0.10588235408067703), - (0.14285714285714285, 0.85098040103912354, 0.85098040103912354), - (0.2857142857142857, 0.45882353186607361, 0.45882353186607361), - (0.42857142857142855, 0.90588235855102539, 0.90588235855102539), - (0.5714285714285714, 0.40000000596046448, 0.40000000596046448), - (0.7142857142857143, 0.90196079015731812, 0.90196079015731812), - (0.8571428571428571, 0.65098041296005249, 0.65098041296005249), - (1.0, 0.40000000596046448, 0.40000000596046448)]} - -_GnBu_data = {'blue': [(0.0, 0.94117647409439087, -0.94117647409439087), (0.125, 0.85882353782653809, -0.85882353782653809), (0.25, 0.77254903316497803, -0.77254903316497803), (0.375, 0.70980393886566162, -0.70980393886566162), (0.5, 0.76862746477127075, 0.76862746477127075), -(0.625, 0.82745099067687988, 0.82745099067687988), (0.75, -0.7450980544090271, 0.7450980544090271), (0.875, 0.67450982332229614, -0.67450982332229614), (1.0, 0.5058823823928833, 0.5058823823928833)], - - 'green': [(0.0, 0.98823529481887817, 0.98823529481887817), (0.125, - 0.9529411792755127, 0.9529411792755127), (0.25, - 0.92156863212585449, 0.92156863212585449), (0.375, - 0.86666667461395264, 0.86666667461395264), (0.5, - 0.80000001192092896, 0.80000001192092896), (0.625, - 0.70196080207824707, 0.70196080207824707), (0.75, - 0.54901963472366333, 0.54901963472366333), (0.875, - 0.40784314274787903, 0.40784314274787903), (1.0, - 0.25098040699958801, 0.25098040699958801)], - - 'red': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.87843137979507446, 0.87843137979507446), (0.25, - 0.80000001192092896, 0.80000001192092896), (0.375, - 0.65882354974746704, 0.65882354974746704), (0.5, - 0.48235294222831726, 0.48235294222831726), (0.625, - 0.30588236451148987, 0.30588236451148987), (0.75, - 0.16862745583057404, 0.16862745583057404), (0.875, - 0.031372550874948502, 0.031372550874948502), (1.0, - 0.031372550874948502, 0.031372550874948502)]} - -_Greens_data = {'blue': [(0.0, 0.96078431606292725, -0.96078431606292725), (0.125, 0.87843137979507446, -0.87843137979507446), (0.25, 0.75294119119644165, -0.75294119119644165), (0.375, 0.60784316062927246, -0.60784316062927246), (0.5, 0.46274510025978088, 0.46274510025978088), -(0.625, 0.364705890417099, 0.364705890417099), (0.75, -0.27058824896812439, 0.27058824896812439), (0.875, -0.17254902422428131, 0.17254902422428131), (1.0, 0.10588235408067703, -0.10588235408067703)], - - 'green': [(0.0, 0.98823529481887817, 0.98823529481887817), (0.125, - 0.96078431606292725, 0.96078431606292725), (0.25, - 0.91372549533843994, 0.91372549533843994), (0.375, - 0.85098040103912354, 0.85098040103912354), (0.5, - 0.76862746477127075, 0.76862746477127075), (0.625, - 0.67058825492858887, 0.67058825492858887), (0.75, - 0.54509806632995605, 0.54509806632995605), (0.875, - 0.42745098471641541, 0.42745098471641541), (1.0, - 0.26666668057441711, 0.26666668057441711)], - - 'red': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.89803922176361084, 0.89803922176361084), (0.25, - 0.78039216995239258, 0.78039216995239258), (0.375, - 0.63137257099151611, 0.63137257099151611), (0.5, - 0.45490196347236633, 0.45490196347236633), (0.625, - 0.25490197539329529, 0.25490197539329529), (0.75, - 0.13725490868091583, 0.13725490868091583), (0.875, 0.0, 0.0), - (1.0, 0.0, 0.0)]} - -_Greys_data = {'blue': [(0.0, 1.0, 1.0), (0.125, 0.94117647409439087, -0.94117647409439087), (0.25, 0.85098040103912354, -0.85098040103912354), (0.375, 0.74117648601531982, -0.74117648601531982), (0.5, 0.58823531866073608, 0.58823531866073608), -(0.625, 0.45098039507865906, 0.45098039507865906), (0.75, -0.32156863808631897, 0.32156863808631897), (0.875, -0.14509804546833038, 0.14509804546833038), (1.0, 0.0, 0.0)], - - 'green': [(0.0, 1.0, 1.0), (0.125, 0.94117647409439087, - 0.94117647409439087), (0.25, 0.85098040103912354, - 0.85098040103912354), (0.375, 0.74117648601531982, - 0.74117648601531982), (0.5, 0.58823531866073608, - 0.58823531866073608), (0.625, 0.45098039507865906, - 0.45098039507865906), (0.75, 0.32156863808631897, - 0.32156863808631897), (0.875, 0.14509804546833038, - 0.14509804546833038), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.94117647409439087, - 0.94117647409439087), (0.25, 0.85098040103912354, - 0.85098040103912354), (0.375, 0.74117648601531982, - 0.74117648601531982), (0.5, 0.58823531866073608, - 0.58823531866073608), (0.625, 0.45098039507865906, - 0.45098039507865906), (0.75, 0.32156863808631897, - 0.32156863808631897), (0.875, 0.14509804546833038, - 0.14509804546833038), (1.0, 0.0, 0.0)]} - -_Oranges_data = {'blue': [(0.0, 0.92156863212585449, -0.92156863212585449), (0.125, 0.80784314870834351, -0.80784314870834351), (0.25, 0.63529413938522339, -0.63529413938522339), (0.375, 0.41960784792900085, -0.41960784792900085), (0.5, 0.23529411852359772, 0.23529411852359772), -(0.625, 0.074509806931018829, 0.074509806931018829), (0.75, -0.0039215688593685627, 0.0039215688593685627), (0.875, -0.011764706112444401, 0.011764706112444401), (1.0, -0.015686275437474251, 0.015686275437474251)], - - 'green': [(0.0, 0.96078431606292725, 0.96078431606292725), (0.125, - 0.90196079015731812, 0.90196079015731812), (0.25, - 0.81568628549575806, 0.81568628549575806), (0.375, - 0.68235296010971069, 0.68235296010971069), (0.5, - 0.55294120311737061, 0.55294120311737061), (0.625, - 0.4117647111415863, 0.4117647111415863), (0.75, - 0.28235295414924622, 0.28235295414924622), (0.875, - 0.21176470816135406, 0.21176470816135406), (1.0, - 0.15294118225574493, 0.15294118225574493)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.99607843160629272, - 0.99607843160629272), (0.25, 0.99215686321258545, - 0.99215686321258545), (0.375, 0.99215686321258545, - 0.99215686321258545), (0.5, 0.99215686321258545, - 0.99215686321258545), (0.625, 0.94509804248809814, - 0.94509804248809814), (0.75, 0.85098040103912354, - 0.85098040103912354), (0.875, 0.65098041296005249, - 0.65098041296005249), (1.0, 0.49803921580314636, - 0.49803921580314636)]} - -_OrRd_data = {'blue': [(0.0, 0.92549020051956177, -0.92549020051956177), (0.125, 0.78431373834609985, -0.78431373834609985), (0.25, 0.61960786581039429, -0.61960786581039429), (0.375, 0.51764708757400513, -0.51764708757400513), (0.5, 0.3490196168422699, 0.3490196168422699), -(0.625, 0.28235295414924622, 0.28235295414924622), (0.75, -0.12156862765550613, 0.12156862765550613), (0.875, 0.0, 0.0), (1.0, -0.0, 0.0)], - - 'green': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.90980392694473267, 0.90980392694473267), (0.25, - 0.83137255907058716, 0.83137255907058716), (0.375, - 0.73333334922790527, 0.73333334922790527), (0.5, - 0.55294120311737061, 0.55294120311737061), (0.625, - 0.3960784375667572, 0.3960784375667572), (0.75, - 0.18823529779911041, 0.18823529779911041), (0.875, 0.0, 0.0), - (1.0, 0.0, 0.0)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.99607843160629272, - 0.99607843160629272), (0.25, 0.99215686321258545, - 0.99215686321258545), (0.375, 0.99215686321258545, - 0.99215686321258545), (0.5, 0.98823529481887817, - 0.98823529481887817), (0.625, 0.93725490570068359, - 0.93725490570068359), (0.75, 0.84313726425170898, - 0.84313726425170898), (0.875, 0.70196080207824707, - 0.70196080207824707), (1.0, 0.49803921580314636, - 0.49803921580314636)]} - -_Paired_data = {'blue': [(0.0, 0.89019608497619629, -0.89019608497619629), (0.090909090909090912, 0.70588237047195435, -0.70588237047195435), (0.18181818181818182, 0.54117649793624878, -0.54117649793624878), (0.27272727272727271, 0.17254902422428131, -0.17254902422428131), (0.36363636363636365, 0.60000002384185791, -0.60000002384185791), (0.45454545454545453, 0.10980392247438431, -0.10980392247438431), (0.54545454545454541, 0.43529412150382996, -0.43529412150382996), (0.63636363636363635, 0.0, 0.0), -(0.72727272727272729, 0.83921569585800171, 0.83921569585800171), -(0.81818181818181823, 0.60392159223556519, 0.60392159223556519), -(0.90909090909090906, 0.60000002384185791, 0.60000002384185791), (1.0, -0.15686275064945221, 0.15686275064945221)], - - 'green': [(0.0, 0.80784314870834351, 0.80784314870834351), - (0.090909090909090912, 0.47058823704719543, 0.47058823704719543), - (0.18181818181818182, 0.87450981140136719, 0.87450981140136719), - (0.27272727272727271, 0.62745100259780884, 0.62745100259780884), - (0.36363636363636365, 0.60392159223556519, 0.60392159223556519), - (0.45454545454545453, 0.10196078568696976, 0.10196078568696976), - (0.54545454545454541, 0.74901962280273438, 0.74901962280273438), - (0.63636363636363635, 0.49803921580314636, 0.49803921580314636), - (0.72727272727272729, 0.69803923368453979, 0.69803923368453979), - (0.81818181818181823, 0.23921568691730499, 0.23921568691730499), - (0.90909090909090906, 1.0, 1.0), (1.0, 0.3490196168422699, - 0.3490196168422699)], - - 'red': [(0.0, 0.65098041296005249, 0.65098041296005249), - (0.090909090909090912, 0.12156862765550613, 0.12156862765550613), - (0.18181818181818182, 0.69803923368453979, 0.69803923368453979), - (0.27272727272727271, 0.20000000298023224, 0.20000000298023224), - (0.36363636363636365, 0.9843137264251709, 0.9843137264251709), - (0.45454545454545453, 0.89019608497619629, 0.89019608497619629), - (0.54545454545454541, 0.99215686321258545, 0.99215686321258545), - (0.63636363636363635, 1.0, 1.0), (0.72727272727272729, - 0.7921568751335144, 0.7921568751335144), (0.81818181818181823, - 0.41568627953529358, 0.41568627953529358), (0.90909090909090906, - 1.0, 1.0), (1.0, 0.69411766529083252, 0.69411766529083252)]} - -_Pastel1_data = {'blue': [(0.0, 0.68235296010971069, -0.68235296010971069), (0.125, 0.89019608497619629, -0.89019608497619629), (0.25, 0.77254903316497803, -0.77254903316497803), (0.375, 0.89411765336990356, -0.89411765336990356), (0.5, 0.65098041296005249, 0.65098041296005249), -(0.625, 0.80000001192092896, 0.80000001192092896), (0.75, -0.74117648601531982, 0.74117648601531982), (0.875, -0.92549020051956177, 0.92549020051956177), (1.0, 0.94901961088180542, -0.94901961088180542)], - - 'green': [(0.0, 0.70588237047195435, 0.70588237047195435), (0.125, - 0.80392158031463623, 0.80392158031463623), (0.25, - 0.92156863212585449, 0.92156863212585449), (0.375, - 0.79607844352722168, 0.79607844352722168), (0.5, - 0.85098040103912354, 0.85098040103912354), (0.625, 1.0, 1.0), - (0.75, 0.84705883264541626, 0.84705883264541626), (0.875, - 0.85490196943283081, 0.85490196943283081), (1.0, - 0.94901961088180542, 0.94901961088180542)], - - 'red': [(0.0, 0.9843137264251709, 0.9843137264251709), (0.125, - 0.70196080207824707, 0.70196080207824707), (0.25, - 0.80000001192092896, 0.80000001192092896), (0.375, - 0.87058824300765991, 0.87058824300765991), (0.5, - 0.99607843160629272, 0.99607843160629272), (0.625, 1.0, 1.0), - (0.75, 0.89803922176361084, 0.89803922176361084), (0.875, - 0.99215686321258545, 0.99215686321258545), (1.0, - 0.94901961088180542, 0.94901961088180542)]} - -_Pastel2_data = {'blue': [(0.0, 0.80392158031463623, -0.80392158031463623), (0.14285714285714285, 0.67450982332229614, -0.67450982332229614), (0.2857142857142857, 0.90980392694473267, -0.90980392694473267), (0.42857142857142855, 0.89411765336990356, -0.89411765336990356), (0.5714285714285714, 0.78823530673980713, -0.78823530673980713), (0.7142857142857143, 0.68235296010971069, -0.68235296010971069), (0.8571428571428571, 0.80000001192092896, -0.80000001192092896), (1.0, 0.80000001192092896, -0.80000001192092896)], - - 'green': [(0.0, 0.88627451658248901, 0.88627451658248901), - (0.14285714285714285, 0.80392158031463623, 0.80392158031463623), - (0.2857142857142857, 0.83529412746429443, 0.83529412746429443), - (0.42857142857142855, 0.7921568751335144, 0.7921568751335144), - (0.5714285714285714, 0.96078431606292725, 0.96078431606292725), - (0.7142857142857143, 0.94901961088180542, 0.94901961088180542), - (0.8571428571428571, 0.88627451658248901, 0.88627451658248901), - (1.0, 0.80000001192092896, 0.80000001192092896)], - - 'red': [(0.0, 0.70196080207824707, 0.70196080207824707), - (0.14285714285714285, 0.99215686321258545, 0.99215686321258545), - (0.2857142857142857, 0.79607844352722168, 0.79607844352722168), - (0.42857142857142855, 0.95686274766921997, 0.95686274766921997), - (0.5714285714285714, 0.90196079015731812, 0.90196079015731812), - (0.7142857142857143, 1.0, 1.0), (0.8571428571428571, - 0.94509804248809814, 0.94509804248809814), (1.0, - 0.80000001192092896, 0.80000001192092896)]} - -_PiYG_data = {'blue': [(0.0, 0.32156863808631897, -0.32156863808631897), (0.10000000000000001, 0.49019607901573181, -0.49019607901573181), (0.20000000000000001, 0.68235296010971069, -0.68235296010971069), (0.29999999999999999, 0.85490196943283081, -0.85490196943283081), (0.40000000000000002, 0.93725490570068359, -0.93725490570068359), (0.5, 0.9686274528503418, 0.9686274528503418), -(0.59999999999999998, 0.81568628549575806, 0.81568628549575806), -(0.69999999999999996, 0.52549022436141968, 0.52549022436141968), -(0.80000000000000004, 0.25490197539329529, 0.25490197539329529), -(0.90000000000000002, 0.12941177189350128, 0.12941177189350128), (1.0, -0.098039217293262482, 0.098039217293262482)], - - 'green': [(0.0, 0.0039215688593685627, 0.0039215688593685627), - (0.10000000000000001, 0.10588235408067703, 0.10588235408067703), - (0.20000000000000001, 0.46666666865348816, 0.46666666865348816), - (0.29999999999999999, 0.7137255072593689, 0.7137255072593689), - (0.40000000000000002, 0.87843137979507446, 0.87843137979507446), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.96078431606292725, 0.96078431606292725), - (0.69999999999999996, 0.88235294818878174, 0.88235294818878174), - (0.80000000000000004, 0.73725491762161255, 0.73725491762161255), - (0.90000000000000002, 0.57254904508590698, 0.57254904508590698), - (1.0, 0.39215686917304993, 0.39215686917304993)], - - 'red': [(0.0, 0.55686277151107788, 0.55686277151107788), - (0.10000000000000001, 0.77254903316497803, 0.77254903316497803), - (0.20000000000000001, 0.87058824300765991, 0.87058824300765991), - (0.29999999999999999, 0.94509804248809814, 0.94509804248809814), - (0.40000000000000002, 0.99215686321258545, 0.99215686321258545), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.90196079015731812, 0.90196079015731812), - (0.69999999999999996, 0.72156864404678345, 0.72156864404678345), - (0.80000000000000004, 0.49803921580314636, 0.49803921580314636), - (0.90000000000000002, 0.30196079611778259, 0.30196079611778259), - (1.0, 0.15294118225574493, 0.15294118225574493)]} - -_PRGn_data = {'blue': [(0.0, 0.29411765933036804, -0.29411765933036804), (0.10000000000000001, 0.51372551918029785, -0.51372551918029785), (0.20000000000000001, 0.67058825492858887, -0.67058825492858887), (0.29999999999999999, 0.81176471710205078, -0.81176471710205078), (0.40000000000000002, 0.90980392694473267, -0.90980392694473267), (0.5, 0.9686274528503418, 0.9686274528503418), -(0.59999999999999998, 0.82745099067687988, 0.82745099067687988), -(0.69999999999999996, 0.62745100259780884, 0.62745100259780884), -(0.80000000000000004, 0.3803921639919281, 0.3803921639919281), -(0.90000000000000002, 0.21568627655506134, 0.21568627655506134), (1.0, -0.10588235408067703, 0.10588235408067703)], - - 'green': [(0.0, 0.0, 0.0), (0.10000000000000001, - 0.16470588743686676, 0.16470588743686676), (0.20000000000000001, - 0.43921568989753723, 0.43921568989753723), (0.29999999999999999, - 0.64705884456634521, 0.64705884456634521), (0.40000000000000002, - 0.83137255907058716, 0.83137255907058716), (0.5, - 0.9686274528503418, 0.9686274528503418), (0.59999999999999998, - 0.94117647409439087, 0.94117647409439087), (0.69999999999999996, - 0.85882353782653809, 0.85882353782653809), (0.80000000000000004, - 0.68235296010971069, 0.68235296010971069), (0.90000000000000002, - 0.47058823704719543, 0.47058823704719543), (1.0, - 0.26666668057441711, 0.26666668057441711)], - - 'red': [(0.0, 0.25098040699958801, 0.25098040699958801), - (0.10000000000000001, 0.46274510025978088, 0.46274510025978088), - (0.20000000000000001, 0.60000002384185791, 0.60000002384185791), - (0.29999999999999999, 0.7607843279838562, 0.7607843279838562), - (0.40000000000000002, 0.90588235855102539, 0.90588235855102539), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.85098040103912354, 0.85098040103912354), - (0.69999999999999996, 0.65098041296005249, 0.65098041296005249), - (0.80000000000000004, 0.35294118523597717, 0.35294118523597717), - (0.90000000000000002, 0.10588235408067703, 0.10588235408067703), - (1.0, 0.0, 0.0)]} - -_PuBu_data = {'blue': [(0.0, 0.9843137264251709, 0.9843137264251709), -(0.125, 0.94901961088180542, 0.94901961088180542), (0.25, -0.90196079015731812, 0.90196079015731812), (0.375, -0.85882353782653809, 0.85882353782653809), (0.5, 0.81176471710205078, -0.81176471710205078), (0.625, 0.75294119119644165, -0.75294119119644165), (0.75, 0.69019609689712524, -0.69019609689712524), (0.875, 0.55294120311737061, -0.55294120311737061), (1.0, 0.34509804844856262, -0.34509804844856262)], - - 'green': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.90588235855102539, 0.90588235855102539), (0.25, - 0.81960785388946533, 0.81960785388946533), (0.375, - 0.74117648601531982, 0.74117648601531982), (0.5, - 0.66274511814117432, 0.66274511814117432), (0.625, - 0.56470590829849243, 0.56470590829849243), (0.75, - 0.43921568989753723, 0.43921568989753723), (0.875, - 0.35294118523597717, 0.35294118523597717), (1.0, - 0.21960784494876862, 0.21960784494876862)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.92549020051956177, - 0.92549020051956177), (0.25, 0.81568628549575806, - 0.81568628549575806), (0.375, 0.65098041296005249, - 0.65098041296005249), (0.5, 0.45490196347236633, - 0.45490196347236633), (0.625, 0.21176470816135406, - 0.21176470816135406), (0.75, 0.019607843831181526, - 0.019607843831181526), (0.875, 0.015686275437474251, - 0.015686275437474251), (1.0, 0.0078431377187371254, - 0.0078431377187371254)]} - -_PuBuGn_data = {'blue': [(0.0, 0.9843137264251709, -0.9843137264251709), (0.125, 0.94117647409439087, -0.94117647409439087), (0.25, 0.90196079015731812, -0.90196079015731812), (0.375, 0.85882353782653809, -0.85882353782653809), (0.5, 0.81176471710205078, 0.81176471710205078), -(0.625, 0.75294119119644165, 0.75294119119644165), (0.75, -0.54117649793624878, 0.54117649793624878), (0.875, 0.3490196168422699, -0.3490196168422699), (1.0, 0.21176470816135406, 0.21176470816135406)], - - 'green': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.88627451658248901, 0.88627451658248901), (0.25, - 0.81960785388946533, 0.81960785388946533), (0.375, - 0.74117648601531982, 0.74117648601531982), (0.5, - 0.66274511814117432, 0.66274511814117432), (0.625, - 0.56470590829849243, 0.56470590829849243), (0.75, - 0.5058823823928833, 0.5058823823928833), (0.875, - 0.42352941632270813, 0.42352941632270813), (1.0, - 0.27450981736183167, 0.27450981736183167)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.92549020051956177, - 0.92549020051956177), (0.25, 0.81568628549575806, - 0.81568628549575806), (0.375, 0.65098041296005249, - 0.65098041296005249), (0.5, 0.40392157435417175, - 0.40392157435417175), (0.625, 0.21176470816135406, - 0.21176470816135406), (0.75, 0.0078431377187371254, - 0.0078431377187371254), (0.875, 0.0039215688593685627, - 0.0039215688593685627), (1.0, 0.0039215688593685627, - 0.0039215688593685627)]} - -_PuOr_data = {'blue': [(0.0, 0.031372550874948502, -0.031372550874948502), (0.10000000000000001, 0.023529412224888802, -0.023529412224888802), (0.20000000000000001, 0.078431375324726105, -0.078431375324726105), (0.29999999999999999, 0.38823530077934265, -0.38823530077934265), (0.40000000000000002, 0.7137255072593689, -0.7137255072593689), (0.5, 0.9686274528503418, 0.9686274528503418), -(0.59999999999999998, 0.92156863212585449, 0.92156863212585449), -(0.69999999999999996, 0.82352942228317261, 0.82352942228317261), -(0.80000000000000004, 0.67450982332229614, 0.67450982332229614), -(0.90000000000000002, 0.53333336114883423, 0.53333336114883423), (1.0, -0.29411765933036804, 0.29411765933036804)], - - 'green': [(0.0, 0.23137255012989044, 0.23137255012989044), - (0.10000000000000001, 0.34509804844856262, 0.34509804844856262), - (0.20000000000000001, 0.50980395078659058, 0.50980395078659058), - (0.29999999999999999, 0.72156864404678345, 0.72156864404678345), - (0.40000000000000002, 0.87843137979507446, 0.87843137979507446), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.85490196943283081, 0.85490196943283081), - (0.69999999999999996, 0.67058825492858887, 0.67058825492858887), - (0.80000000000000004, 0.45098039507865906, 0.45098039507865906), - (0.90000000000000002, 0.15294118225574493, 0.15294118225574493), - (1.0, 0.0, 0.0)], - - 'red': [(0.0, 0.49803921580314636, 0.49803921580314636), - (0.10000000000000001, 0.70196080207824707, 0.70196080207824707), - (0.20000000000000001, 0.87843137979507446, 0.87843137979507446), - (0.29999999999999999, 0.99215686321258545, 0.99215686321258545), - (0.40000000000000002, 0.99607843160629272, 0.99607843160629272), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.84705883264541626, 0.84705883264541626), - (0.69999999999999996, 0.69803923368453979, 0.69803923368453979), - (0.80000000000000004, 0.50196081399917603, 0.50196081399917603), - (0.90000000000000002, 0.32941177487373352, 0.32941177487373352), - (1.0, 0.17647059261798859, 0.17647059261798859)]} - -_PuRd_data = {'blue': [(0.0, 0.97647058963775635, -0.97647058963775635), (0.125, 0.93725490570068359, -0.93725490570068359), (0.25, 0.85490196943283081, -0.85490196943283081), (0.375, 0.78039216995239258, -0.78039216995239258), (0.5, 0.69019609689712524, 0.69019609689712524), -(0.625, 0.54117649793624878, 0.54117649793624878), (0.75, -0.33725491166114807, 0.33725491166114807), (0.875, -0.26274511218070984, 0.26274511218070984), (1.0, 0.12156862765550613, -0.12156862765550613)], - - 'green': [(0.0, 0.95686274766921997, 0.95686274766921997), (0.125, - 0.88235294818878174, 0.88235294818878174), (0.25, - 0.72549021244049072, 0.72549021244049072), (0.375, - 0.58039218187332153, 0.58039218187332153), (0.5, - 0.3960784375667572, 0.3960784375667572), (0.625, - 0.16078431904315948, 0.16078431904315948), (0.75, - 0.070588238537311554, 0.070588238537311554), (0.875, 0.0, 0.0), - (1.0, 0.0, 0.0)], - - 'red': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.90588235855102539, 0.90588235855102539), (0.25, - 0.83137255907058716, 0.83137255907058716), (0.375, - 0.78823530673980713, 0.78823530673980713), (0.5, - 0.87450981140136719, 0.87450981140136719), (0.625, - 0.90588235855102539, 0.90588235855102539), (0.75, - 0.80784314870834351, 0.80784314870834351), (0.875, - 0.59607845544815063, 0.59607845544815063), (1.0, - 0.40392157435417175, 0.40392157435417175)]} - -_Purples_data = {'blue': [(0.0, 0.99215686321258545, -0.99215686321258545), (0.125, 0.96078431606292725, -0.96078431606292725), (0.25, 0.92156863212585449, -0.92156863212585449), (0.375, 0.86274510622024536, -0.86274510622024536), (0.5, 0.78431373834609985, 0.78431373834609985), -(0.625, 0.729411780834198, 0.729411780834198), (0.75, -0.63921570777893066, 0.63921570777893066), (0.875, -0.56078433990478516, 0.56078433990478516), (1.0, 0.49019607901573181, -0.49019607901573181)], - - 'green': [(0.0, 0.9843137264251709, 0.9843137264251709), (0.125, - 0.92941176891326904, 0.92941176891326904), (0.25, - 0.85490196943283081, 0.85490196943283081), (0.375, - 0.74117648601531982, 0.74117648601531982), (0.5, - 0.60392159223556519, 0.60392159223556519), (0.625, - 0.49019607901573181, 0.49019607901573181), (0.75, - 0.31764706969261169, 0.31764706969261169), (0.875, - 0.15294118225574493, 0.15294118225574493), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 0.98823529481887817, 0.98823529481887817), (0.125, - 0.93725490570068359, 0.93725490570068359), (0.25, - 0.85490196943283081, 0.85490196943283081), (0.375, - 0.73725491762161255, 0.73725491762161255), (0.5, - 0.61960786581039429, 0.61960786581039429), (0.625, - 0.50196081399917603, 0.50196081399917603), (0.75, - 0.41568627953529358, 0.41568627953529358), (0.875, - 0.32941177487373352, 0.32941177487373352), (1.0, - 0.24705882370471954, 0.24705882370471954)]} - -_RdBu_data = {'blue': [(0.0, 0.12156862765550613, -0.12156862765550613), (0.10000000000000001, 0.16862745583057404, -0.16862745583057404), (0.20000000000000001, 0.30196079611778259, -0.30196079611778259), (0.29999999999999999, 0.50980395078659058, -0.50980395078659058), (0.40000000000000002, 0.78039216995239258, -0.78039216995239258), (0.5, 0.9686274528503418, 0.9686274528503418), -(0.59999999999999998, 0.94117647409439087, 0.94117647409439087), -(0.69999999999999996, 0.87058824300765991, 0.87058824300765991), -(0.80000000000000004, 0.76470589637756348, 0.76470589637756348), -(0.90000000000000002, 0.67450982332229614, 0.67450982332229614), (1.0, -0.3803921639919281, 0.3803921639919281)], - - 'green': [(0.0, 0.0, 0.0), (0.10000000000000001, - 0.094117648899555206, 0.094117648899555206), (0.20000000000000001, - 0.37647059559822083, 0.37647059559822083), (0.29999999999999999, - 0.64705884456634521, 0.64705884456634521), (0.40000000000000002, - 0.85882353782653809, 0.85882353782653809), (0.5, - 0.9686274528503418, 0.9686274528503418), (0.59999999999999998, - 0.89803922176361084, 0.89803922176361084), (0.69999999999999996, - 0.77254903316497803, 0.77254903316497803), (0.80000000000000004, - 0.57647061347961426, 0.57647061347961426), (0.90000000000000002, - 0.40000000596046448, 0.40000000596046448), (1.0, - 0.18823529779911041, 0.18823529779911041)], - - 'red': [(0.0, 0.40392157435417175, 0.40392157435417175), - (0.10000000000000001, 0.69803923368453979, 0.69803923368453979), - (0.20000000000000001, 0.83921569585800171, 0.83921569585800171), - (0.29999999999999999, 0.95686274766921997, 0.95686274766921997), - (0.40000000000000002, 0.99215686321258545, 0.99215686321258545), - (0.5, 0.9686274528503418, 0.9686274528503418), - (0.59999999999999998, 0.81960785388946533, 0.81960785388946533), - (0.69999999999999996, 0.57254904508590698, 0.57254904508590698), - (0.80000000000000004, 0.26274511218070984, 0.26274511218070984), - (0.90000000000000002, 0.12941177189350128, 0.12941177189350128), - (1.0, 0.019607843831181526, 0.019607843831181526)]} - -_RdGy_data = {'blue': [(0.0, 0.12156862765550613, -0.12156862765550613), (0.10000000000000001, 0.16862745583057404, -0.16862745583057404), (0.20000000000000001, 0.30196079611778259, -0.30196079611778259), (0.29999999999999999, 0.50980395078659058, -0.50980395078659058), (0.40000000000000002, 0.78039216995239258, -0.78039216995239258), (0.5, 1.0, 1.0), (0.59999999999999998, -0.87843137979507446, 0.87843137979507446), (0.69999999999999996, -0.729411780834198, 0.729411780834198), (0.80000000000000004, -0.52941179275512695, 0.52941179275512695), (0.90000000000000002, -0.30196079611778259, 0.30196079611778259), (1.0, 0.10196078568696976, -0.10196078568696976)], - - 'green': [(0.0, 0.0, 0.0), (0.10000000000000001, - 0.094117648899555206, 0.094117648899555206), (0.20000000000000001, - 0.37647059559822083, 0.37647059559822083), (0.29999999999999999, - 0.64705884456634521, 0.64705884456634521), (0.40000000000000002, - 0.85882353782653809, 0.85882353782653809), (0.5, 1.0, 1.0), - (0.59999999999999998, 0.87843137979507446, 0.87843137979507446), - (0.69999999999999996, 0.729411780834198, 0.729411780834198), - (0.80000000000000004, 0.52941179275512695, 0.52941179275512695), - (0.90000000000000002, 0.30196079611778259, 0.30196079611778259), - (1.0, 0.10196078568696976, 0.10196078568696976)], - - 'red': [(0.0, 0.40392157435417175, 0.40392157435417175), - (0.10000000000000001, 0.69803923368453979, 0.69803923368453979), - (0.20000000000000001, 0.83921569585800171, 0.83921569585800171), - (0.29999999999999999, 0.95686274766921997, 0.95686274766921997), - (0.40000000000000002, 0.99215686321258545, 0.99215686321258545), - (0.5, 1.0, 1.0), (0.59999999999999998, 0.87843137979507446, - 0.87843137979507446), (0.69999999999999996, 0.729411780834198, - 0.729411780834198), (0.80000000000000004, 0.52941179275512695, - 0.52941179275512695), (0.90000000000000002, 0.30196079611778259, - 0.30196079611778259), (1.0, 0.10196078568696976, - 0.10196078568696976)]} - -_RdPu_data = {'blue': [(0.0, 0.9529411792755127, 0.9529411792755127), -(0.125, 0.86666667461395264, 0.86666667461395264), (0.25, -0.75294119119644165, 0.75294119119644165), (0.375, -0.70980393886566162, 0.70980393886566162), (0.5, 0.63137257099151611, -0.63137257099151611), (0.625, 0.59215688705444336, -0.59215688705444336), (0.75, 0.49411764740943909, -0.49411764740943909), (0.875, 0.46666666865348816, -0.46666666865348816), (1.0, 0.41568627953529358, -0.41568627953529358)], - - 'green': [(0.0, 0.9686274528503418, 0.9686274528503418), (0.125, - 0.87843137979507446, 0.87843137979507446), (0.25, - 0.77254903316497803, 0.77254903316497803), (0.375, - 0.62352943420410156, 0.62352943420410156), (0.5, - 0.40784314274787903, 0.40784314274787903), (0.625, - 0.20392157137393951, 0.20392157137393951), (0.75, - 0.0039215688593685627, 0.0039215688593685627), (0.875, - 0.0039215688593685627, 0.0039215688593685627), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.99215686321258545, - 0.99215686321258545), (0.25, 0.98823529481887817, - 0.98823529481887817), (0.375, 0.98039215803146362, - 0.98039215803146362), (0.5, 0.9686274528503418, - 0.9686274528503418), (0.625, 0.86666667461395264, - 0.86666667461395264), (0.75, 0.68235296010971069, - 0.68235296010971069), (0.875, 0.47843137383460999, - 0.47843137383460999), (1.0, 0.28627452254295349, - 0.28627452254295349)]} - -_RdYlBu_data = {'blue': [(0.0, 0.14901961386203766, - 0.14901961386203766), (0.10000000149011612, - 0.15294118225574493, 0.15294118225574493), - (0.20000000298023224, 0.26274511218070984, - 0.26274511218070984), (0.30000001192092896, - 0.3803921639919281, 0.3803921639919281), - (0.40000000596046448, 0.56470590829849243, - 0.56470590829849243), (0.5, 0.74901962280273438, - 0.74901962280273438), (0.60000002384185791, - 0.97254902124404907, 0.97254902124404907), - (0.69999998807907104, 0.91372549533843994, - 0.91372549533843994), (0.80000001192092896, - 0.81960785388946533, 0.81960785388946533), - (0.89999997615814209, 0.70588237047195435, - 0.70588237047195435), (1.0, 0.58431375026702881, - 0.58431375026702881)], 'green': [(0.0, 0.0, 0.0), - (0.10000000149011612, 0.18823529779911041, - 0.18823529779911041), (0.20000000298023224, - 0.42745098471641541, 0.42745098471641541), - (0.30000001192092896, 0.68235296010971069, - 0.68235296010971069), (0.40000000596046448, - 0.87843137979507446, 0.87843137979507446), (0.5, 1.0, - 1.0), (0.60000002384185791, 0.9529411792755127, - 0.9529411792755127), (0.69999998807907104, - 0.85098040103912354, 0.85098040103912354), - (0.80000001192092896, 0.67843139171600342, - 0.67843139171600342), (0.89999997615814209, - 0.45882353186607361, 0.45882353186607361), (1.0, - 0.21176470816135406, 0.21176470816135406)], 'red': - [(0.0, 0.64705884456634521, 0.64705884456634521), - (0.10000000149011612, 0.84313726425170898, - 0.84313726425170898), (0.20000000298023224, - 0.95686274766921997, 0.95686274766921997), - (0.30000001192092896, 0.99215686321258545, - 0.99215686321258545), (0.40000000596046448, - 0.99607843160629272, 0.99607843160629272), (0.5, 1.0, - 1.0), (0.60000002384185791, 0.87843137979507446, - 0.87843137979507446), (0.69999998807907104, - 0.67058825492858887, 0.67058825492858887), - (0.80000001192092896, 0.45490196347236633, - 0.45490196347236633), (0.89999997615814209, - 0.27058824896812439, 0.27058824896812439), (1.0, - 0.19215686619281769, 0.19215686619281769)]} - -_RdYlGn_data = {'blue': [(0.0, 0.14901961386203766, -0.14901961386203766), (0.10000000000000001, 0.15294118225574493, -0.15294118225574493), (0.20000000000000001, 0.26274511218070984, -0.26274511218070984), (0.29999999999999999, 0.3803921639919281, -0.3803921639919281), (0.40000000000000002, 0.54509806632995605, -0.54509806632995605), (0.5, 0.74901962280273438, 0.74901962280273438), -(0.59999999999999998, 0.54509806632995605, 0.54509806632995605), -(0.69999999999999996, 0.41568627953529358, 0.41568627953529358), -(0.80000000000000004, 0.38823530077934265, 0.38823530077934265), -(0.90000000000000002, 0.31372550129890442, 0.31372550129890442), (1.0, -0.21568627655506134, 0.21568627655506134)], - - 'green': [(0.0, 0.0, 0.0), (0.10000000000000001, - 0.18823529779911041, 0.18823529779911041), (0.20000000000000001, - 0.42745098471641541, 0.42745098471641541), (0.29999999999999999, - 0.68235296010971069, 0.68235296010971069), (0.40000000000000002, - 0.87843137979507446, 0.87843137979507446), (0.5, 1.0, 1.0), - (0.59999999999999998, 0.93725490570068359, 0.93725490570068359), - (0.69999999999999996, 0.85098040103912354, 0.85098040103912354), - (0.80000000000000004, 0.74117648601531982, 0.74117648601531982), - (0.90000000000000002, 0.59607845544815063, 0.59607845544815063), - (1.0, 0.40784314274787903, 0.40784314274787903)], - - 'red': [(0.0, 0.64705884456634521, 0.64705884456634521), - (0.10000000000000001, 0.84313726425170898, 0.84313726425170898), - (0.20000000000000001, 0.95686274766921997, 0.95686274766921997), - (0.29999999999999999, 0.99215686321258545, 0.99215686321258545), - (0.40000000000000002, 0.99607843160629272, 0.99607843160629272), - (0.5, 1.0, 1.0), (0.59999999999999998, 0.85098040103912354, - 0.85098040103912354), (0.69999999999999996, 0.65098041296005249, - 0.65098041296005249), (0.80000000000000004, 0.40000000596046448, - 0.40000000596046448), (0.90000000000000002, 0.10196078568696976, - 0.10196078568696976), (1.0, 0.0, 0.0)]} - -_Reds_data = {'blue': [(0.0, 0.94117647409439087, -0.94117647409439087), (0.125, 0.82352942228317261, -0.82352942228317261), (0.25, 0.63137257099151611, -0.63137257099151611), (0.375, 0.44705882668495178, -0.44705882668495178), (0.5, 0.29019609093666077, 0.29019609093666077), -(0.625, 0.17254902422428131, 0.17254902422428131), (0.75, -0.11372549086809158, 0.11372549086809158), (0.875, -0.08235294371843338, 0.08235294371843338), (1.0, 0.050980392843484879, -0.050980392843484879)], - - 'green': [(0.0, 0.96078431606292725, 0.96078431606292725), (0.125, - 0.87843137979507446, 0.87843137979507446), (0.25, - 0.73333334922790527, 0.73333334922790527), (0.375, - 0.57254904508590698, 0.57254904508590698), (0.5, - 0.41568627953529358, 0.41568627953529358), (0.625, - 0.23137255012989044, 0.23137255012989044), (0.75, - 0.094117648899555206, 0.094117648899555206), (0.875, - 0.058823529630899429, 0.058823529630899429), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.99607843160629272, - 0.99607843160629272), (0.25, 0.98823529481887817, - 0.98823529481887817), (0.375, 0.98823529481887817, - 0.98823529481887817), (0.5, 0.9843137264251709, - 0.9843137264251709), (0.625, 0.93725490570068359, - 0.93725490570068359), (0.75, 0.79607844352722168, - 0.79607844352722168), (0.875, 0.64705884456634521, - 0.64705884456634521), (1.0, 0.40392157435417175, - 0.40392157435417175)]} - -_Set1_data = {'blue': [(0.0, 0.10980392247438431, -0.10980392247438431), (0.125, 0.72156864404678345, -0.72156864404678345), (0.25, 0.29019609093666077, -0.29019609093666077), (0.375, 0.63921570777893066, -0.63921570777893066), (0.5, 0.0, 0.0), (0.625, 0.20000000298023224, -0.20000000298023224), (0.75, 0.15686275064945221, -0.15686275064945221), (0.875, 0.74901962280273438, -0.74901962280273438), (1.0, 0.60000002384185791, -0.60000002384185791)], - - 'green': [(0.0, 0.10196078568696976, 0.10196078568696976), (0.125, - 0.49411764740943909, 0.49411764740943909), (0.25, - 0.68627452850341797, 0.68627452850341797), (0.375, - 0.30588236451148987, 0.30588236451148987), (0.5, - 0.49803921580314636, 0.49803921580314636), (0.625, 1.0, 1.0), - (0.75, 0.33725491166114807, 0.33725491166114807), (0.875, - 0.5058823823928833, 0.5058823823928833), (1.0, - 0.60000002384185791, 0.60000002384185791)], - - 'red': [(0.0, 0.89411765336990356, 0.89411765336990356), (0.125, - 0.21568627655506134, 0.21568627655506134), (0.25, - 0.30196079611778259, 0.30196079611778259), (0.375, - 0.59607845544815063, 0.59607845544815063), (0.5, 1.0, 1.0), - (0.625, 1.0, 1.0), (0.75, 0.65098041296005249, - 0.65098041296005249), (0.875, 0.9686274528503418, - 0.9686274528503418), (1.0, 0.60000002384185791, - 0.60000002384185791)]} - -_Set2_data = {'blue': [(0.0, 0.64705884456634521, -0.64705884456634521), (0.14285714285714285, 0.38431373238563538, -0.38431373238563538), (0.2857142857142857, 0.79607844352722168, -0.79607844352722168), (0.42857142857142855, 0.76470589637756348, -0.76470589637756348), (0.5714285714285714, 0.32941177487373352, -0.32941177487373352), (0.7142857142857143, 0.18431372940540314, -0.18431372940540314), (0.8571428571428571, 0.58039218187332153, -0.58039218187332153), (1.0, 0.70196080207824707, -0.70196080207824707)], - - 'green': [(0.0, 0.7607843279838562, 0.7607843279838562), - (0.14285714285714285, 0.55294120311737061, 0.55294120311737061), - (0.2857142857142857, 0.62745100259780884, 0.62745100259780884), - (0.42857142857142855, 0.54117649793624878, 0.54117649793624878), - (0.5714285714285714, 0.84705883264541626, 0.84705883264541626), - (0.7142857142857143, 0.85098040103912354, 0.85098040103912354), - (0.8571428571428571, 0.76862746477127075, 0.76862746477127075), - (1.0, 0.70196080207824707, 0.70196080207824707)], - - 'red': [(0.0, 0.40000000596046448, 0.40000000596046448), - (0.14285714285714285, 0.98823529481887817, 0.98823529481887817), - (0.2857142857142857, 0.55294120311737061, 0.55294120311737061), - (0.42857142857142855, 0.90588235855102539, 0.90588235855102539), - (0.5714285714285714, 0.65098041296005249, 0.65098041296005249), - (0.7142857142857143, 1.0, 1.0), (0.8571428571428571, - 0.89803922176361084, 0.89803922176361084), (1.0, - 0.70196080207824707, 0.70196080207824707)]} - -_Set3_data = {'blue': [(0.0, 0.78039216995239258, -0.78039216995239258), (0.090909090909090912, 0.70196080207824707, -0.70196080207824707), (0.18181818181818182, 0.85490196943283081, -0.85490196943283081), (0.27272727272727271, 0.44705882668495178, -0.44705882668495178), (0.36363636363636365, 0.82745099067687988, -0.82745099067687988), (0.45454545454545453, 0.38431373238563538, -0.38431373238563538), (0.54545454545454541, 0.4117647111415863, -0.4117647111415863), (0.63636363636363635, 0.89803922176361084, -0.89803922176361084), (0.72727272727272729, 0.85098040103912354, -0.85098040103912354), (0.81818181818181823, 0.74117648601531982, -0.74117648601531982), (0.90909090909090906, 0.77254903316497803, -0.77254903316497803), (1.0, 0.43529412150382996, -0.43529412150382996)], - - 'green': [(0.0, 0.82745099067687988, 0.82745099067687988), - (0.090909090909090912, 1.0, 1.0), (0.18181818181818182, - 0.729411780834198, 0.729411780834198), (0.27272727272727271, - 0.50196081399917603, 0.50196081399917603), (0.36363636363636365, - 0.69411766529083252, 0.69411766529083252), (0.45454545454545453, - 0.70588237047195435, 0.70588237047195435), (0.54545454545454541, - 0.87058824300765991, 0.87058824300765991), (0.63636363636363635, - 0.80392158031463623, 0.80392158031463623), (0.72727272727272729, - 0.85098040103912354, 0.85098040103912354), (0.81818181818181823, - 0.50196081399917603, 0.50196081399917603), (0.90909090909090906, - 0.92156863212585449, 0.92156863212585449), (1.0, - 0.92941176891326904, 0.92941176891326904)], - - 'red': [(0.0, 0.55294120311737061, 0.55294120311737061), - (0.090909090909090912, 1.0, 1.0), (0.18181818181818182, - 0.7450980544090271, 0.7450980544090271), (0.27272727272727271, - 0.9843137264251709, 0.9843137264251709), (0.36363636363636365, - 0.50196081399917603, 0.50196081399917603), (0.45454545454545453, - 0.99215686321258545, 0.99215686321258545), (0.54545454545454541, - 0.70196080207824707, 0.70196080207824707), (0.63636363636363635, - 0.98823529481887817, 0.98823529481887817), (0.72727272727272729, - 0.85098040103912354, 0.85098040103912354), (0.81818181818181823, - 0.73725491762161255, 0.73725491762161255), (0.90909090909090906, - 0.80000001192092896, 0.80000001192092896), (1.0, 1.0, 1.0)]} - -_Spectral_data = {'blue': [(0.0, 0.25882354378700256, -0.25882354378700256), (0.10000000000000001, 0.30980393290519714, -0.30980393290519714), (0.20000000000000001, 0.26274511218070984, -0.26274511218070984), (0.29999999999999999, 0.3803921639919281, -0.3803921639919281), (0.40000000000000002, 0.54509806632995605, -0.54509806632995605), (0.5, 0.74901962280273438, 0.74901962280273438), -(0.59999999999999998, 0.59607845544815063, 0.59607845544815063), -(0.69999999999999996, 0.64313727617263794, 0.64313727617263794), -(0.80000000000000004, 0.64705884456634521, 0.64705884456634521), -(0.90000000000000002, 0.74117648601531982, 0.74117648601531982), (1.0, -0.63529413938522339, 0.63529413938522339)], - - 'green': [(0.0, 0.0039215688593685627, 0.0039215688593685627), - (0.10000000000000001, 0.24313725531101227, 0.24313725531101227), - (0.20000000000000001, 0.42745098471641541, 0.42745098471641541), - (0.29999999999999999, 0.68235296010971069, 0.68235296010971069), - (0.40000000000000002, 0.87843137979507446, 0.87843137979507446), - (0.5, 1.0, 1.0), (0.59999999999999998, 0.96078431606292725, - 0.96078431606292725), (0.69999999999999996, 0.86666667461395264, - 0.86666667461395264), (0.80000000000000004, 0.7607843279838562, - 0.7607843279838562), (0.90000000000000002, 0.53333336114883423, - 0.53333336114883423), (1.0, 0.30980393290519714, - 0.30980393290519714)], - - 'red': [(0.0, 0.61960786581039429, 0.61960786581039429), - (0.10000000000000001, 0.83529412746429443, 0.83529412746429443), - (0.20000000000000001, 0.95686274766921997, 0.95686274766921997), - (0.29999999999999999, 0.99215686321258545, 0.99215686321258545), - (0.40000000000000002, 0.99607843160629272, 0.99607843160629272), - (0.5, 1.0, 1.0), (0.59999999999999998, 0.90196079015731812, - 0.90196079015731812), (0.69999999999999996, 0.67058825492858887, - 0.67058825492858887), (0.80000000000000004, 0.40000000596046448, - 0.40000000596046448), (0.90000000000000002, 0.19607843458652496, - 0.19607843458652496), (1.0, 0.36862745881080627, - 0.36862745881080627)]} - -_YlGn_data = {'blue': [(0.0, 0.89803922176361084, -0.89803922176361084), (0.125, 0.72549021244049072, -0.72549021244049072), (0.25, 0.63921570777893066, -0.63921570777893066), (0.375, 0.55686277151107788, -0.55686277151107788), (0.5, 0.47450980544090271, 0.47450980544090271), -(0.625, 0.364705890417099, 0.364705890417099), (0.75, -0.26274511218070984, 0.26274511218070984), (0.875, -0.21568627655506134, 0.21568627655506134), (1.0, 0.16078431904315948, -0.16078431904315948)], - - 'green': [(0.0, 1.0, 1.0), (0.125, 0.98823529481887817, - 0.98823529481887817), (0.25, 0.94117647409439087, - 0.94117647409439087), (0.375, 0.86666667461395264, - 0.86666667461395264), (0.5, 0.7764706015586853, - 0.7764706015586853), (0.625, 0.67058825492858887, - 0.67058825492858887), (0.75, 0.51764708757400513, - 0.51764708757400513), (0.875, 0.40784314274787903, - 0.40784314274787903), (1.0, 0.27058824896812439, - 0.27058824896812439)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.9686274528503418, - 0.9686274528503418), (0.25, 0.85098040103912354, - 0.85098040103912354), (0.375, 0.67843139171600342, - 0.67843139171600342), (0.5, 0.47058823704719543, - 0.47058823704719543), (0.625, 0.25490197539329529, - 0.25490197539329529), (0.75, 0.13725490868091583, - 0.13725490868091583), (0.875, 0.0, 0.0), (1.0, 0.0, 0.0)]} - -_YlGnBu_data = {'blue': [(0.0, 0.85098040103912354, -0.85098040103912354), (0.125, 0.69411766529083252, -0.69411766529083252), (0.25, 0.70588237047195435, -0.70588237047195435), (0.375, 0.73333334922790527, -0.73333334922790527), (0.5, 0.76862746477127075, 0.76862746477127075), -(0.625, 0.75294119119644165, 0.75294119119644165), (0.75, -0.65882354974746704, 0.65882354974746704), (0.875, -0.58039218187332153, 0.58039218187332153), (1.0, 0.34509804844856262, -0.34509804844856262)], - - 'green': [(0.0, 1.0, 1.0), (0.125, 0.97254902124404907, - 0.97254902124404907), (0.25, 0.91372549533843994, - 0.91372549533843994), (0.375, 0.80392158031463623, - 0.80392158031463623), (0.5, 0.7137255072593689, - 0.7137255072593689), (0.625, 0.56862747669219971, - 0.56862747669219971), (0.75, 0.36862745881080627, - 0.36862745881080627), (0.875, 0.20392157137393951, - 0.20392157137393951), (1.0, 0.11372549086809158, - 0.11372549086809158)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 0.92941176891326904, - 0.92941176891326904), (0.25, 0.78039216995239258, - 0.78039216995239258), (0.375, 0.49803921580314636, - 0.49803921580314636), (0.5, 0.25490197539329529, - 0.25490197539329529), (0.625, 0.11372549086809158, - 0.11372549086809158), (0.75, 0.13333334028720856, - 0.13333334028720856), (0.875, 0.14509804546833038, - 0.14509804546833038), (1.0, 0.031372550874948502, - 0.031372550874948502)]} - -_YlOrBr_data = {'blue': [(0.0, 0.89803922176361084, -0.89803922176361084), (0.125, 0.73725491762161255, -0.73725491762161255), (0.25, 0.56862747669219971, -0.56862747669219971), (0.375, 0.30980393290519714, -0.30980393290519714), (0.5, 0.16078431904315948, 0.16078431904315948), -(0.625, 0.078431375324726105, 0.078431375324726105), (0.75, -0.0078431377187371254, 0.0078431377187371254), (0.875, -0.015686275437474251, 0.015686275437474251), (1.0, -0.023529412224888802, 0.023529412224888802)], - - 'green': [(0.0, 1.0, 1.0), (0.125, 0.9686274528503418, - 0.9686274528503418), (0.25, 0.89019608497619629, - 0.89019608497619629), (0.375, 0.76862746477127075, - 0.76862746477127075), (0.5, 0.60000002384185791, - 0.60000002384185791), (0.625, 0.43921568989753723, - 0.43921568989753723), (0.75, 0.29803922772407532, - 0.29803922772407532), (0.875, 0.20392157137393951, - 0.20392157137393951), (1.0, 0.14509804546833038, - 0.14509804546833038)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 1.0, 1.0), (0.25, - 0.99607843160629272, 0.99607843160629272), (0.375, - 0.99607843160629272, 0.99607843160629272), (0.5, - 0.99607843160629272, 0.99607843160629272), (0.625, - 0.92549020051956177, 0.92549020051956177), (0.75, - 0.80000001192092896, 0.80000001192092896), (0.875, - 0.60000002384185791, 0.60000002384185791), (1.0, - 0.40000000596046448, 0.40000000596046448)]} - -_YlOrRd_data = {'blue': [(0.0, 0.80000001192092896, -0.80000001192092896), (0.125, 0.62745100259780884, -0.62745100259780884), (0.25, 0.46274510025978088, -0.46274510025978088), (0.375, 0.29803922772407532, -0.29803922772407532), (0.5, 0.23529411852359772, 0.23529411852359772), -(0.625, 0.16470588743686676, 0.16470588743686676), (0.75, -0.10980392247438431, 0.10980392247438431), (0.875, -0.14901961386203766, 0.14901961386203766), (1.0, 0.14901961386203766, -0.14901961386203766)], - - 'green': [(0.0, 1.0, 1.0), (0.125, 0.92941176891326904, - 0.92941176891326904), (0.25, 0.85098040103912354, - 0.85098040103912354), (0.375, 0.69803923368453979, - 0.69803923368453979), (0.5, 0.55294120311737061, - 0.55294120311737061), (0.625, 0.30588236451148987, - 0.30588236451148987), (0.75, 0.10196078568696976, - 0.10196078568696976), (0.875, 0.0, 0.0), (1.0, 0.0, 0.0)], - - 'red': [(0.0, 1.0, 1.0), (0.125, 1.0, 1.0), (0.25, - 0.99607843160629272, 0.99607843160629272), (0.375, - 0.99607843160629272, 0.99607843160629272), (0.5, - 0.99215686321258545, 0.99215686321258545), (0.625, - 0.98823529481887817, 0.98823529481887817), (0.75, - 0.89019608497619629, 0.89019608497619629), (0.875, - 0.74117648601531982, 0.74117648601531982), (1.0, - 0.50196081399917603, 0.50196081399917603)]} +# RGB values taken from Brewer's Excel sheet, divided by 255 + +_Blues_data = ( + (0.96862745098039216, 0.98431372549019602, 1.0 ), + (0.87058823529411766, 0.92156862745098034, 0.96862745098039216), + (0.77647058823529413, 0.85882352941176465, 0.93725490196078431), + (0.61960784313725492, 0.792156862745098 , 0.88235294117647056), + (0.41960784313725491, 0.68235294117647061, 0.83921568627450982), + (0.25882352941176473, 0.5725490196078431 , 0.77647058823529413), + (0.12941176470588237, 0.44313725490196076, 0.70980392156862748), + (0.03137254901960784, 0.31764705882352939, 0.61176470588235299), + (0.03137254901960784, 0.18823529411764706, 0.41960784313725491) + ) + +_BrBG_data = ( + (0.32941176470588235, 0.18823529411764706, 0.0196078431372549 ), + (0.5490196078431373 , 0.31764705882352939, 0.0392156862745098 ), + (0.74901960784313726, 0.50588235294117645, 0.17647058823529413), + (0.87450980392156863, 0.76078431372549016, 0.49019607843137253), + (0.96470588235294119, 0.90980392156862744, 0.76470588235294112), + (0.96078431372549022, 0.96078431372549022, 0.96078431372549022), + (0.7803921568627451 , 0.91764705882352937, 0.89803921568627454), + (0.50196078431372548, 0.80392156862745101, 0.75686274509803919), + (0.20784313725490197, 0.59215686274509804, 0.5607843137254902 ), + (0.00392156862745098, 0.4 , 0.36862745098039218), + (0.0 , 0.23529411764705882, 0.18823529411764706) + ) + +_BuGn_data = ( + (0.96862745098039216, 0.9882352941176471 , 0.99215686274509807), + (0.89803921568627454, 0.96078431372549022, 0.97647058823529409), + (0.8 , 0.92549019607843142, 0.90196078431372551), + (0.6 , 0.84705882352941175, 0.78823529411764703), + (0.4 , 0.76078431372549016, 0.64313725490196083), + (0.25490196078431371, 0.68235294117647061, 0.46274509803921571), + (0.13725490196078433, 0.54509803921568623, 0.27058823529411763), + (0.0 , 0.42745098039215684, 0.17254901960784313), + (0.0 , 0.26666666666666666, 0.10588235294117647) + ) + +_BuPu_data = ( + (0.96862745098039216, 0.9882352941176471 , 0.99215686274509807), + (0.8784313725490196 , 0.92549019607843142, 0.95686274509803926), + (0.74901960784313726, 0.82745098039215681, 0.90196078431372551), + (0.61960784313725492, 0.73725490196078436, 0.85490196078431369), + (0.5490196078431373 , 0.58823529411764708, 0.77647058823529413), + (0.5490196078431373 , 0.41960784313725491, 0.69411764705882351), + (0.53333333333333333, 0.25490196078431371, 0.61568627450980395), + (0.50588235294117645, 0.05882352941176471, 0.48627450980392156), + (0.30196078431372547, 0.0 , 0.29411764705882354) + ) + +_GnBu_data = ( + (0.96862745098039216, 0.9882352941176471 , 0.94117647058823528), + (0.8784313725490196 , 0.95294117647058818, 0.85882352941176465), + (0.8 , 0.92156862745098034, 0.77254901960784317), + (0.6588235294117647 , 0.8666666666666667 , 0.70980392156862748), + (0.4823529411764706 , 0.8 , 0.7686274509803922 ), + (0.30588235294117649, 0.70196078431372544, 0.82745098039215681), + (0.16862745098039217, 0.5490196078431373 , 0.74509803921568629), + (0.03137254901960784, 0.40784313725490196, 0.67450980392156867), + (0.03137254901960784, 0.25098039215686274, 0.50588235294117645) + ) + +_Greens_data = ( + (0.96862745098039216, 0.9882352941176471 , 0.96078431372549022), + (0.89803921568627454, 0.96078431372549022, 0.8784313725490196 ), + (0.7803921568627451 , 0.9137254901960784 , 0.75294117647058822), + (0.63137254901960782, 0.85098039215686272, 0.60784313725490191), + (0.45490196078431372, 0.7686274509803922 , 0.46274509803921571), + (0.25490196078431371, 0.6705882352941176 , 0.36470588235294116), + (0.13725490196078433, 0.54509803921568623, 0.27058823529411763), + (0.0 , 0.42745098039215684, 0.17254901960784313), + (0.0 , 0.26666666666666666, 0.10588235294117647) + ) + +_Greys_data = ( + (1.0 , 1.0 , 1.0 ), + (0.94117647058823528, 0.94117647058823528, 0.94117647058823528), + (0.85098039215686272, 0.85098039215686272, 0.85098039215686272), + (0.74117647058823533, 0.74117647058823533, 0.74117647058823533), + (0.58823529411764708, 0.58823529411764708, 0.58823529411764708), + (0.45098039215686275, 0.45098039215686275, 0.45098039215686275), + (0.32156862745098042, 0.32156862745098042, 0.32156862745098042), + (0.14509803921568629, 0.14509803921568629, 0.14509803921568629), + (0.0 , 0.0 , 0.0 ) + ) + +_Oranges_data = ( + (1.0 , 0.96078431372549022, 0.92156862745098034), + (0.99607843137254903, 0.90196078431372551, 0.80784313725490198), + (0.99215686274509807, 0.81568627450980391, 0.63529411764705879), + (0.99215686274509807, 0.68235294117647061, 0.41960784313725491), + (0.99215686274509807, 0.55294117647058827, 0.23529411764705882), + (0.94509803921568625, 0.41176470588235292, 0.07450980392156863), + (0.85098039215686272, 0.28235294117647058, 0.00392156862745098), + (0.65098039215686276, 0.21176470588235294, 0.01176470588235294), + (0.49803921568627452, 0.15294117647058825, 0.01568627450980392) + ) + +_OrRd_data = ( + (1.0 , 0.96862745098039216, 0.92549019607843142), + (0.99607843137254903, 0.90980392156862744, 0.78431372549019607), + (0.99215686274509807, 0.83137254901960789, 0.61960784313725492), + (0.99215686274509807, 0.73333333333333328, 0.51764705882352946), + (0.9882352941176471 , 0.55294117647058827, 0.34901960784313724), + (0.93725490196078431, 0.396078431372549 , 0.28235294117647058), + (0.84313725490196079, 0.18823529411764706, 0.12156862745098039), + (0.70196078431372544, 0.0 , 0.0 ), + (0.49803921568627452, 0.0 , 0.0 ) + ) + +_PiYG_data = ( + (0.55686274509803924, 0.00392156862745098, 0.32156862745098042), + (0.77254901960784317, 0.10588235294117647, 0.49019607843137253), + (0.87058823529411766, 0.46666666666666667, 0.68235294117647061), + (0.94509803921568625, 0.71372549019607845, 0.85490196078431369), + (0.99215686274509807, 0.8784313725490196 , 0.93725490196078431), + (0.96862745098039216, 0.96862745098039216, 0.96862745098039216), + (0.90196078431372551, 0.96078431372549022, 0.81568627450980391), + (0.72156862745098038, 0.88235294117647056, 0.52549019607843139), + (0.49803921568627452, 0.73725490196078436, 0.25490196078431371), + (0.30196078431372547, 0.5725490196078431 , 0.12941176470588237), + (0.15294117647058825, 0.39215686274509803, 0.09803921568627451) + ) + +_PRGn_data = ( + (0.25098039215686274, 0.0 , 0.29411764705882354), + (0.46274509803921571, 0.16470588235294117, 0.51372549019607838), + (0.6 , 0.4392156862745098 , 0.6705882352941176 ), + (0.76078431372549016, 0.6470588235294118 , 0.81176470588235294), + (0.90588235294117647, 0.83137254901960789, 0.90980392156862744), + (0.96862745098039216, 0.96862745098039216, 0.96862745098039216), + (0.85098039215686272, 0.94117647058823528, 0.82745098039215681), + (0.65098039215686276, 0.85882352941176465, 0.62745098039215685), + (0.35294117647058826, 0.68235294117647061, 0.38039215686274508), + (0.10588235294117647, 0.47058823529411764, 0.21568627450980393), + (0.0 , 0.26666666666666666, 0.10588235294117647) + ) + +_PuBu_data = ( + (1.0 , 0.96862745098039216, 0.98431372549019602), + (0.92549019607843142, 0.90588235294117647, 0.94901960784313721), + (0.81568627450980391, 0.81960784313725488, 0.90196078431372551), + (0.65098039215686276, 0.74117647058823533, 0.85882352941176465), + (0.45490196078431372, 0.66274509803921566, 0.81176470588235294), + (0.21176470588235294, 0.56470588235294117, 0.75294117647058822), + (0.0196078431372549 , 0.4392156862745098 , 0.69019607843137254), + (0.01568627450980392, 0.35294117647058826, 0.55294117647058827), + (0.00784313725490196, 0.2196078431372549 , 0.34509803921568627) + ) + +_PuBuGn_data = ( + (1.0 , 0.96862745098039216, 0.98431372549019602), + (0.92549019607843142, 0.88627450980392153, 0.94117647058823528), + (0.81568627450980391, 0.81960784313725488, 0.90196078431372551), + (0.65098039215686276, 0.74117647058823533, 0.85882352941176465), + (0.40392156862745099, 0.66274509803921566, 0.81176470588235294), + (0.21176470588235294, 0.56470588235294117, 0.75294117647058822), + (0.00784313725490196, 0.50588235294117645, 0.54117647058823526), + (0.00392156862745098, 0.42352941176470588, 0.34901960784313724), + (0.00392156862745098, 0.27450980392156865, 0.21176470588235294) + ) + +_PuOr_data = ( + (0.49803921568627452, 0.23137254901960785, 0.03137254901960784), + (0.70196078431372544, 0.34509803921568627, 0.02352941176470588), + (0.8784313725490196 , 0.50980392156862742, 0.07843137254901961), + (0.99215686274509807, 0.72156862745098038, 0.38823529411764707), + (0.99607843137254903, 0.8784313725490196 , 0.71372549019607845), + (0.96862745098039216, 0.96862745098039216, 0.96862745098039216), + (0.84705882352941175, 0.85490196078431369, 0.92156862745098034), + (0.69803921568627447, 0.6705882352941176 , 0.82352941176470584), + (0.50196078431372548, 0.45098039215686275, 0.67450980392156867), + (0.32941176470588235, 0.15294117647058825, 0.53333333333333333), + (0.17647058823529413, 0.0 , 0.29411764705882354) + ) + +_PuRd_data = ( + (0.96862745098039216, 0.95686274509803926, 0.97647058823529409), + (0.90588235294117647, 0.88235294117647056, 0.93725490196078431), + (0.83137254901960789, 0.72549019607843135, 0.85490196078431369), + (0.78823529411764703, 0.58039215686274515, 0.7803921568627451 ), + (0.87450980392156863, 0.396078431372549 , 0.69019607843137254), + (0.90588235294117647, 0.16078431372549021, 0.54117647058823526), + (0.80784313725490198, 0.07058823529411765, 0.33725490196078434), + (0.59607843137254901, 0.0 , 0.2627450980392157 ), + (0.40392156862745099, 0.0 , 0.12156862745098039) + ) + +_Purples_data = ( + (0.9882352941176471 , 0.98431372549019602, 0.99215686274509807), + (0.93725490196078431, 0.92941176470588238, 0.96078431372549022), + (0.85490196078431369, 0.85490196078431369, 0.92156862745098034), + (0.73725490196078436, 0.74117647058823533, 0.86274509803921573), + (0.61960784313725492, 0.60392156862745094, 0.78431372549019607), + (0.50196078431372548, 0.49019607843137253, 0.72941176470588232), + (0.41568627450980394, 0.31764705882352939, 0.63921568627450975), + (0.32941176470588235, 0.15294117647058825, 0.5607843137254902 ), + (0.24705882352941178, 0.0 , 0.49019607843137253) + ) + +_RdBu_data = ( + (0.40392156862745099, 0.0 , 0.12156862745098039), + (0.69803921568627447, 0.09411764705882353, 0.16862745098039217), + (0.83921568627450982, 0.37647058823529411, 0.30196078431372547), + (0.95686274509803926, 0.6470588235294118 , 0.50980392156862742), + (0.99215686274509807, 0.85882352941176465, 0.7803921568627451 ), + (0.96862745098039216, 0.96862745098039216, 0.96862745098039216), + (0.81960784313725488, 0.89803921568627454, 0.94117647058823528), + (0.5725490196078431 , 0.77254901960784317, 0.87058823529411766), + (0.2627450980392157 , 0.57647058823529407, 0.76470588235294112), + (0.12941176470588237, 0.4 , 0.67450980392156867), + (0.0196078431372549 , 0.18823529411764706, 0.38039215686274508) + ) + +_RdGy_data = ( + (0.40392156862745099, 0.0 , 0.12156862745098039), + (0.69803921568627447, 0.09411764705882353, 0.16862745098039217), + (0.83921568627450982, 0.37647058823529411, 0.30196078431372547), + (0.95686274509803926, 0.6470588235294118 , 0.50980392156862742), + (0.99215686274509807, 0.85882352941176465, 0.7803921568627451 ), + (1.0 , 1.0 , 1.0 ), + (0.8784313725490196 , 0.8784313725490196 , 0.8784313725490196 ), + (0.72941176470588232, 0.72941176470588232, 0.72941176470588232), + (0.52941176470588236, 0.52941176470588236, 0.52941176470588236), + (0.30196078431372547, 0.30196078431372547, 0.30196078431372547), + (0.10196078431372549, 0.10196078431372549, 0.10196078431372549) + ) + +_RdPu_data = ( + (1.0 , 0.96862745098039216, 0.95294117647058818), + (0.99215686274509807, 0.8784313725490196 , 0.86666666666666667), + (0.9882352941176471 , 0.77254901960784317, 0.75294117647058822), + (0.98039215686274506, 0.62352941176470589, 0.70980392156862748), + (0.96862745098039216, 0.40784313725490196, 0.63137254901960782), + (0.86666666666666667, 0.20392156862745098, 0.59215686274509804), + (0.68235294117647061, 0.00392156862745098, 0.49411764705882355), + (0.47843137254901963, 0.00392156862745098, 0.46666666666666667), + (0.28627450980392155, 0.0 , 0.41568627450980394) + ) + +_RdYlBu_data = ( + (0.6470588235294118 , 0.0 , 0.14901960784313725), + (0.84313725490196079, 0.18823529411764706 , 0.15294117647058825), + (0.95686274509803926, 0.42745098039215684 , 0.2627450980392157 ), + (0.99215686274509807, 0.68235294117647061 , 0.38039215686274508), + (0.99607843137254903, 0.8784313725490196 , 0.56470588235294117), + (1.0 , 1.0 , 0.74901960784313726), + (0.8784313725490196 , 0.95294117647058818 , 0.97254901960784312), + (0.6705882352941176 , 0.85098039215686272 , 0.9137254901960784 ), + (0.45490196078431372, 0.67843137254901964 , 0.81960784313725488), + (0.27058823529411763, 0.45882352941176469 , 0.70588235294117652), + (0.19215686274509805, 0.21176470588235294 , 0.58431372549019611) + ) + +_RdYlGn_data = ( + (0.6470588235294118 , 0.0 , 0.14901960784313725), + (0.84313725490196079, 0.18823529411764706 , 0.15294117647058825), + (0.95686274509803926, 0.42745098039215684 , 0.2627450980392157 ), + (0.99215686274509807, 0.68235294117647061 , 0.38039215686274508), + (0.99607843137254903, 0.8784313725490196 , 0.54509803921568623), + (1.0 , 1.0 , 0.74901960784313726), + (0.85098039215686272, 0.93725490196078431 , 0.54509803921568623), + (0.65098039215686276, 0.85098039215686272 , 0.41568627450980394), + (0.4 , 0.74117647058823533 , 0.38823529411764707), + (0.10196078431372549, 0.59607843137254901 , 0.31372549019607843), + (0.0 , 0.40784313725490196 , 0.21568627450980393) + ) + +_Reds_data = ( + (1.0 , 0.96078431372549022 , 0.94117647058823528), + (0.99607843137254903, 0.8784313725490196 , 0.82352941176470584), + (0.9882352941176471 , 0.73333333333333328 , 0.63137254901960782), + (0.9882352941176471 , 0.5725490196078431 , 0.44705882352941179), + (0.98431372549019602, 0.41568627450980394 , 0.29019607843137257), + (0.93725490196078431, 0.23137254901960785 , 0.17254901960784313), + (0.79607843137254897, 0.094117647058823528, 0.11372549019607843), + (0.6470588235294118 , 0.058823529411764705, 0.08235294117647058), + (0.40392156862745099, 0.0 , 0.05098039215686274) + ) + +_Spectral_data = ( + (0.61960784313725492, 0.003921568627450980, 0.25882352941176473), + (0.83529411764705885, 0.24313725490196078 , 0.30980392156862746), + (0.95686274509803926, 0.42745098039215684 , 0.2627450980392157 ), + (0.99215686274509807, 0.68235294117647061 , 0.38039215686274508), + (0.99607843137254903, 0.8784313725490196 , 0.54509803921568623), + (1.0 , 1.0 , 0.74901960784313726), + (0.90196078431372551, 0.96078431372549022 , 0.59607843137254901), + (0.6705882352941176 , 0.8666666666666667 , 0.64313725490196083), + (0.4 , 0.76078431372549016 , 0.6470588235294118 ), + (0.19607843137254902, 0.53333333333333333 , 0.74117647058823533), + (0.36862745098039218, 0.30980392156862746 , 0.63529411764705879) + ) + +_YlGn_data = ( + (1.0 , 1.0 , 0.89803921568627454), + (0.96862745098039216, 0.9882352941176471 , 0.72549019607843135), + (0.85098039215686272, 0.94117647058823528 , 0.63921568627450975), + (0.67843137254901964, 0.8666666666666667 , 0.55686274509803924), + (0.47058823529411764, 0.77647058823529413 , 0.47450980392156861), + (0.25490196078431371, 0.6705882352941176 , 0.36470588235294116), + (0.13725490196078433, 0.51764705882352946 , 0.2627450980392157 ), + (0.0 , 0.40784313725490196 , 0.21568627450980393), + (0.0 , 0.27058823529411763 , 0.16078431372549021) + ) + +_YlGnBu_data = ( + (1.0 , 1.0 , 0.85098039215686272), + (0.92941176470588238, 0.97254901960784312 , 0.69411764705882351), + (0.7803921568627451 , 0.9137254901960784 , 0.70588235294117652), + (0.49803921568627452, 0.80392156862745101 , 0.73333333333333328), + (0.25490196078431371, 0.71372549019607845 , 0.7686274509803922 ), + (0.11372549019607843, 0.56862745098039214 , 0.75294117647058822), + (0.13333333333333333, 0.36862745098039218 , 0.6588235294117647 ), + (0.14509803921568629, 0.20392156862745098 , 0.58039215686274515), + (0.03137254901960784, 0.11372549019607843 , 0.34509803921568627) + ) + +_YlOrBr_data = ( + (1.0 , 1.0 , 0.89803921568627454), + (1.0 , 0.96862745098039216 , 0.73725490196078436), + (0.99607843137254903, 0.8901960784313725 , 0.56862745098039214), + (0.99607843137254903, 0.7686274509803922 , 0.30980392156862746), + (0.99607843137254903, 0.6 , 0.16078431372549021), + (0.92549019607843142, 0.4392156862745098 , 0.07843137254901961), + (0.8 , 0.29803921568627451 , 0.00784313725490196), + (0.6 , 0.20392156862745098 , 0.01568627450980392), + (0.4 , 0.14509803921568629 , 0.02352941176470588) + ) + +_YlOrRd_data = ( + (1.0 , 1.0 , 0.8 ), + (1.0 , 0.92941176470588238 , 0.62745098039215685), + (0.99607843137254903, 0.85098039215686272 , 0.46274509803921571), + (0.99607843137254903, 0.69803921568627447 , 0.29803921568627451), + (0.99215686274509807, 0.55294117647058827 , 0.23529411764705882), + (0.9882352941176471 , 0.30588235294117649 , 0.16470588235294117), + (0.8901960784313725 , 0.10196078431372549 , 0.10980392156862745), + (0.74117647058823533, 0.0 , 0.14901960784313725), + (0.50196078431372548, 0.0 , 0.14901960784313725) + ) + + +# ColorBrewer's qualitative maps, implemented using ListedColormap +# for use with mpl.colors.NoNorm + +_Accent_data = ( + (0.49803921568627452, 0.78823529411764703, 0.49803921568627452), + (0.74509803921568629, 0.68235294117647061, 0.83137254901960789), + (0.99215686274509807, 0.75294117647058822, 0.52549019607843139), + (1.0, 1.0, 0.6 ), + (0.2196078431372549, 0.42352941176470588, 0.69019607843137254), + (0.94117647058823528, 0.00784313725490196, 0.49803921568627452), + (0.74901960784313726, 0.35686274509803922, 0.09019607843137254), + (0.4, 0.4, 0.4 ), + ) + +_Dark2_data = ( + (0.10588235294117647, 0.61960784313725492, 0.46666666666666667), + (0.85098039215686272, 0.37254901960784315, 0.00784313725490196), + (0.45882352941176469, 0.4392156862745098, 0.70196078431372544), + (0.90588235294117647, 0.16078431372549021, 0.54117647058823526), + (0.4, 0.65098039215686276, 0.11764705882352941), + (0.90196078431372551, 0.6705882352941176, 0.00784313725490196), + (0.65098039215686276, 0.46274509803921571, 0.11372549019607843), + (0.4, 0.4, 0.4 ), + ) + +_Paired_data = ( + (0.65098039215686276, 0.80784313725490198, 0.8901960784313725 ), + (0.12156862745098039, 0.47058823529411764, 0.70588235294117652), + (0.69803921568627447, 0.87450980392156863, 0.54117647058823526), + (0.2, 0.62745098039215685, 0.17254901960784313), + (0.98431372549019602, 0.60392156862745094, 0.6 ), + (0.8901960784313725, 0.10196078431372549, 0.10980392156862745), + (0.99215686274509807, 0.74901960784313726, 0.43529411764705883), + (1.0, 0.49803921568627452, 0.0 ), + (0.792156862745098, 0.69803921568627447, 0.83921568627450982), + (0.41568627450980394, 0.23921568627450981, 0.60392156862745094), + (1.0, 1.0, 0.6 ), + (0.69411764705882351, 0.34901960784313724, 0.15686274509803921), + ) + +_Pastel1_data = ( + (0.98431372549019602, 0.70588235294117652, 0.68235294117647061), + (0.70196078431372544, 0.80392156862745101, 0.8901960784313725 ), + (0.8, 0.92156862745098034, 0.77254901960784317), + (0.87058823529411766, 0.79607843137254897, 0.89411764705882357), + (0.99607843137254903, 0.85098039215686272, 0.65098039215686276), + (1.0, 1.0, 0.8 ), + (0.89803921568627454, 0.84705882352941175, 0.74117647058823533), + (0.99215686274509807, 0.85490196078431369, 0.92549019607843142), + (0.94901960784313721, 0.94901960784313721, 0.94901960784313721), + ) + +_Pastel2_data = ( + (0.70196078431372544, 0.88627450980392153, 0.80392156862745101), + (0.99215686274509807, 0.80392156862745101, 0.67450980392156867), + (0.79607843137254897, 0.83529411764705885, 0.90980392156862744), + (0.95686274509803926, 0.792156862745098, 0.89411764705882357), + (0.90196078431372551, 0.96078431372549022, 0.78823529411764703), + (1.0, 0.94901960784313721, 0.68235294117647061), + (0.94509803921568625, 0.88627450980392153, 0.8 ), + (0.8, 0.8, 0.8 ), + ) + +_Set1_data = ( + (0.89411764705882357, 0.10196078431372549, 0.10980392156862745), + (0.21568627450980393, 0.49411764705882355, 0.72156862745098038), + (0.30196078431372547, 0.68627450980392157, 0.29019607843137257), + (0.59607843137254901, 0.30588235294117649, 0.63921568627450975), + (1.0, 0.49803921568627452, 0.0 ), + (1.0, 1.0, 0.2 ), + (0.65098039215686276, 0.33725490196078434, 0.15686274509803921), + (0.96862745098039216, 0.50588235294117645, 0.74901960784313726), + (0.6, 0.6, 0.6), + ) + +_Set2_data = ( + (0.4, 0.76078431372549016, 0.6470588235294118 ), + (0.9882352941176471, 0.55294117647058827, 0.3843137254901961 ), + (0.55294117647058827, 0.62745098039215685, 0.79607843137254897), + (0.90588235294117647, 0.54117647058823526, 0.76470588235294112), + (0.65098039215686276, 0.84705882352941175, 0.32941176470588235), + (1.0, 0.85098039215686272, 0.18431372549019609), + (0.89803921568627454, 0.7686274509803922, 0.58039215686274515), + (0.70196078431372544, 0.70196078431372544, 0.70196078431372544), + ) + +_Set3_data = ( + (0.55294117647058827, 0.82745098039215681, 0.7803921568627451 ), + (1.0, 1.0, 0.70196078431372544), + (0.74509803921568629, 0.72941176470588232, 0.85490196078431369), + (0.98431372549019602, 0.50196078431372548, 0.44705882352941179), + (0.50196078431372548, 0.69411764705882351, 0.82745098039215681), + (0.99215686274509807, 0.70588235294117652, 0.3843137254901961 ), + (0.70196078431372544, 0.87058823529411766, 0.41176470588235292), + (0.9882352941176471, 0.80392156862745101, 0.89803921568627454), + (0.85098039215686272, 0.85098039215686272, 0.85098039215686272), + (0.73725490196078436, 0.50196078431372548, 0.74117647058823533), + (0.8, 0.92156862745098034, 0.77254901960784317), + (1.0, 0.92941176470588238, 0.43529411764705883), + ) + # The next 7 palettes are from the Yorick scientific visalisation package, # an evolution of the GIST package, both by David H. Munro. @@ -1947,24 +1305,19 @@ def gfunc32(x): 'terrain': _terrain_data, 'winter': _winter_data, 'nipy_spectral': _nipy_spectral_data, - 'spectral': _nipy_spectral_data, # alias for backward compatibility + 'spectral': _nipy_spectral_data, # alias for backward compatibility } -datad['Accent'] = _Accent_data datad['Blues'] = _Blues_data datad['BrBG'] = _BrBG_data datad['BuGn'] = _BuGn_data datad['BuPu'] = _BuPu_data -datad['Dark2'] = _Dark2_data datad['GnBu'] = _GnBu_data datad['Greens'] = _Greens_data datad['Greys'] = _Greys_data datad['Oranges'] = _Oranges_data datad['OrRd'] = _OrRd_data -datad['Paired'] = _Paired_data -datad['Pastel1'] = _Pastel1_data -datad['Pastel2'] = _Pastel2_data datad['PiYG'] = _PiYG_data datad['PRGn'] = _PRGn_data datad['PuBu'] = _PuBu_data @@ -1978,14 +1331,12 @@ def gfunc32(x): datad['RdYlBu'] = _RdYlBu_data datad['RdYlGn'] = _RdYlGn_data datad['Reds'] = _Reds_data -datad['Set1'] = _Set1_data -datad['Set2'] = _Set2_data -datad['Set3'] = _Set3_data datad['Spectral'] = _Spectral_data datad['YlGn'] = _YlGn_data datad['YlGnBu'] = _YlGnBu_data datad['YlOrBr'] = _YlOrBr_data datad['YlOrRd'] = _YlOrRd_data + datad['gist_earth'] = _gist_earth_data datad['gist_gray'] = _gist_gray_data datad['gist_heat'] = _gist_heat_data @@ -1993,5 +1344,17 @@ def gfunc32(x): datad['gist_rainbow'] = _gist_rainbow_data datad['gist_stern'] = _gist_stern_data datad['gist_yarg'] = _gist_yarg_data + datad['coolwarm'] = _coolwarm_data + datad['Wistia'] = _wistia_data + +# Qualitative +datad['Accent'] = {'listed': _Accent_data} +datad['Dark2'] = {'listed': _Dark2_data} +datad['Paired'] = {'listed': _Paired_data} +datad['Pastel1'] = {'listed': _Pastel1_data} +datad['Pastel2'] = {'listed': _Pastel2_data} +datad['Set1'] = {'listed': _Set1_data} +datad['Set2'] = {'listed': _Set2_data} +datad['Set3'] = {'listed': _Set3_data} diff --git a/lib/matplotlib/cm.py b/lib/matplotlib/cm.py index 65170729bcd4..3d2551f942f3 100644 --- a/lib/matplotlib/cm.py +++ b/lib/matplotlib/cm.py @@ -52,6 +52,9 @@ def _reverse_cmap_spec(spec): """Reverses cmap specification *spec*, can handle both dict and tuple type specs.""" + if 'listed' in spec: + return {'listed': spec['listed'][::-1]} + if 'red' in spec: return revcmap(spec) else: @@ -62,7 +65,7 @@ def _reverse_cmap_spec(spec): def _generate_cmap(name, lutsize): - """Generates the requested cmap from it's name *name*. The lut size is + """Generates the requested cmap from its *name*. The lut size is *lutsize*.""" spec = datad[name] @@ -70,6 +73,8 @@ def _generate_cmap(name, lutsize): # Generate the colormap object. if 'red' in spec: return colors.LinearSegmentedColormap(name, spec, lutsize) + elif 'listed' in spec: + return colors.ListedColormap(spec['listed'], name) else: return colors.LinearSegmentedColormap.from_list(name, spec, lutsize) diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index fd1a1d78ad81..7789151b8ab5 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2060,11 +2060,9 @@ def colormaps(): ColorBrewer Qualitative: - (For plotting nominal data, :class:`ListedColormap` should be used, + (For plotting nominal data, :class:`ListedColormap` is used, not :class:`LinearSegmentedColormap`. Different sets of colors are - recommended for different numbers of categories. These continuous - versions of the qualitative schemes may be removed or converted in the - future.) + recommended for different numbers of categories.) * Accent * Dark2