diff --git a/.gitignore b/.gitignore index bff939b..6cee59b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +cmocean/rgb/drafts/ dist *.pyc .DS_STORE @@ -8,4 +9,5 @@ figures/eval* figures/gallery* .pytest_cache/* docs/build/* +build figures/lightness* diff --git a/MANIFEST.in b/MANIFEST.in index 543b6b5..4fabd54 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,4 @@ -include README.rst +include README.md include *.txt recursive-include cmocean *.txt recursive-include cmocean *.py diff --git a/cmocean/__init__.py b/cmocean/__init__.py index 7774d5d..c57ad26 100644 --- a/cmocean/__init__.py +++ b/cmocean/__init__.py @@ -17,4 +17,4 @@ __authors__ = ['Kristen Thyng '] -__version__ = "1.2" +__version__ = "2.0" diff --git a/cmocean/cm.py b/cmocean/cm.py index 6ea44d6..9829eff 100644 --- a/cmocean/cm.py +++ b/cmocean/cm.py @@ -22,7 +22,7 @@ # List of colormap names cmapnames = ['thermal', 'haline', 'solar', 'ice', 'gray', 'oxy', 'deep', 'dense', 'algae', 'matter', 'turbid', 'speed', 'amp', 'tempo', - 'phase', 'balance', 'delta', 'curl'] + 'rain', 'phase', 'topo', 'balance', 'delta', 'curl', 'diff', 'tarn'] # initialize dictionary to contain colormaps cmap_d = dict() diff --git a/cmocean/plots.py b/cmocean/plots.py index ed502c0..32f5e58 100644 --- a/cmocean/plots.py +++ b/cmocean/plots.py @@ -22,8 +22,9 @@ def plot_lightness(saveplot=False): x = np.linspace(0.0, 1.0, 256) locs = [] # locations for text labels - fig = plt.figure(figsize=(16, 6)) + fig = plt.figure(figsize=(16, 5)) ax = fig.add_subplot(111) + fig.subplots_adjust(left=0.03, right=0.97) ax.set_xlim(-0.1, len(cm.cmap_d)/2. + 0.1) ax.set_ylim(0, 100) ax.set_xlabel('Lightness for each colormap', fontsize=14) @@ -38,9 +39,9 @@ def plot_lightness(saveplot=False): lab = cspace_converter("sRGB1", "CAM02-UCS")(rgb) L = lab[0, :, 0] if L[-1] > L[0]: - ax.scatter(x+j*dc, L, c=x, cmap=cmap, s=300, linewidths=0.) + ax.scatter(x+j*dc, L, c=x, cmap=cmap, s=200, linewidths=0.) else: - ax.scatter(x+j*dc, L[::-1], c=x[::-1], cmap=cmap, s=300, linewidths=0.) + ax.scatter(x+j*dc, L[::-1], c=x[::-1], cmap=cmap, s=200, linewidths=0.) locs.append(x[-1]+j*dc) # store locations for colormap labels # Set up labels for colormaps diff --git a/cmocean/rgb/diff-rgb.txt b/cmocean/rgb/diff-rgb.txt new file mode 100644 index 0000000..397d6ed --- /dev/null +++ b/cmocean/rgb/diff-rgb.txt @@ -0,0 +1,256 @@ +3.080165225110909760e-02 1.368487040065790861e-01 2.498464445599150041e-01 +3.427654989146505099e-02 1.437127028532935447e-01 2.573239494162229413e-01 +3.787813715751361943e-02 1.505402390894255427e-01 2.647902048135927777e-01 +4.156812010333730406e-02 1.573357824203455158e-01 2.722473736730874894e-01 +4.517179532760850352e-02 1.641035092921928340e-01 2.796979818302940402e-01 +4.870180895529663961e-02 1.708454227759541588e-01 2.871401983091831367e-01 +5.214717289956722485e-02 1.775659175978645810e-01 2.945787303179320804e-01 +5.551364141943334468e-02 1.842674761732781552e-01 3.020142881481510666e-01 +5.878267145509050856e-02 1.909546841623958602e-01 3.094531346302050734e-01 +6.203222237219494645e-02 1.976272549553735325e-01 3.168486096722107348e-01 +6.521944756836103863e-02 2.042923786219034143e-01 3.242073651148437707e-01 +6.833928990190613062e-02 2.109538539883098474e-01 3.315240779733869547e-01 +7.142525636138788436e-02 2.176109417067573770e-01 3.387875021305949974e-01 +7.444813366291075374e-02 2.242694950814881905e-01 3.459978826653878348e-01 +7.742364240945528997e-02 2.309308575473027481e-01 3.531440825838942366e-01 +8.038349666926730697e-02 2.375958135712563091e-01 3.602034285272879832e-01 +8.335927002300280719e-02 2.442657843736594225e-01 3.671480689795030838e-01 +8.636609239069936717e-02 2.509437864845217581e-01 3.739531368808389766e-01 +8.948430357745071340e-02 2.576279992007458053e-01 3.805657110274591748e-01 +9.284058523033036914e-02 2.643149709823168769e-01 3.868990078988859826e-01 +9.668345778728781870e-02 2.709875997226547928e-01 3.928398106800405909e-01 +1.013388564145758508e-01 2.776155815858447617e-01 3.982760426582682145e-01 +1.072606416994524026e-01 2.841399259508246011e-01 4.031326823215036770e-01 +1.144021508332261350e-01 2.905306843282992602e-01 4.075704938470787742e-01 +1.224943240061644456e-01 2.967876633109050588e-01 4.117594183512530703e-01 +1.310866885733582565e-01 3.029446515900964254e-01 4.158631835078765437e-01 +1.399259448624195767e-01 3.090284381668210734e-01 4.199407082636338884e-01 +1.488880808179499637e-01 3.150548708758020844e-01 4.240166515702193939e-01 +1.578509724192573571e-01 3.210422517899584882e-01 4.281197299059529837e-01 +1.668002459411131178e-01 3.269969805380745775e-01 4.322421588278035354e-01 +1.756791094481522930e-01 3.329300099876690844e-01 4.364047384684796027e-01 +1.845067584338563049e-01 3.388436977327556332e-01 4.405895801655569377e-01 +1.932823885204988379e-01 3.447414431949823999e-01 4.447966430522279913e-01 +2.019870459778479455e-01 3.506290556082184984e-01 4.490357338061347625e-01 +2.106258150884706692e-01 3.565090549124025343e-01 4.533046032331278785e-01 +2.192099721057354511e-01 3.623829850143509002e-01 4.575959954859014078e-01 +2.277275445301833456e-01 3.682546023486205078e-01 4.619233127548696971e-01 +2.361939130992141700e-01 3.741245762230066552e-01 4.662760464071296629e-01 +2.446124256489054516e-01 3.799946234495278352e-01 4.706542744097454434e-01 +2.529874638889413330e-01 3.858660993963552444e-01 4.750577339190826254e-01 +2.613341048773878406e-01 3.917383910736120800e-01 4.794796637798960925e-01 +2.696394299537646644e-01 3.976153747948966699e-01 4.839303534081906277e-01 +2.779049881050036919e-01 4.034985563305431566e-01 4.884111449080716372e-01 +2.861363993124647065e-01 4.093887667782184492e-01 4.929196308795206760e-01 +2.943389940220551004e-01 4.152865778556348864e-01 4.974548265548736636e-01 +3.025334250389247748e-01 4.211897194688838386e-01 5.020046120542877022e-01 +3.106982442651501364e-01 4.271034039757660716e-01 5.065852469354352738e-01 +3.188368260273997667e-01 4.330284571606364818e-01 5.111959566876937977e-01 +3.269657343217935996e-01 4.389628772920392552e-01 5.158284147455556301e-01 +3.350816436419064015e-01 4.449085811856242079e-01 5.204856000258065718e-01 +3.431739289326510289e-01 4.508688325370560634e-01 5.251766674651570099e-01 +3.512656069646695189e-01 4.568402506918622374e-01 5.298868083741347101e-01 +3.593506132834142774e-01 4.628250736129231879e-01 5.346217853574988244e-01 +3.674172478556836929e-01 4.688267836740107053e-01 5.393913336663840319e-01 +3.754973469427250743e-01 4.748398228270848676e-01 5.441739055327718955e-01 +3.835625614368970981e-01 4.808709517650425203e-01 5.489922576544932209e-01 +3.916201861820892138e-01 4.869196696786777800e-01 5.538424587653016928e-01 +3.996888560566008164e-01 4.929829902359726401e-01 5.587113837570589769e-01 +4.077452976164708254e-01 4.990668992329919118e-01 5.636172499463452112e-01 +4.158238363550112449e-01 5.051647578473101863e-01 5.685356950340605398e-01 +4.238869442834262147e-01 5.112855069066921665e-01 5.734980302852201728e-01 +4.319617699154935098e-01 5.174241819464946435e-01 5.784833267853278782e-01 +4.400436018491948320e-01 5.235826893170786311e-01 5.834960386464431714e-01 +4.481312796407512233e-01 5.297621053719542283e-01 5.885383546494945550e-01 +4.562263279894743229e-01 5.359626809225542798e-01 5.936121659102355785e-01 +4.643239808635050703e-01 5.421865887597332456e-01 5.987202656129063660e-01 +4.724486870344450362e-01 5.484289164378903791e-01 6.038441893417568762e-01 +4.805822297704738788e-01 5.546948405817618832e-01 6.089980501349065989e-01 +4.887172410474664441e-01 5.609869159623338541e-01 6.141889435023867305e-01 +4.968703980230008699e-01 5.673022611108096136e-01 6.194017678807255400e-01 +5.050230443352835552e-01 5.736457002325791033e-01 6.246566996141469374e-01 +5.132020014296254651e-01 5.800120364495556791e-01 6.299281926614284099e-01 +5.213837697997298903e-01 5.864072076681272616e-01 6.352414056079356275e-01 +5.295840791882617804e-01 5.928284223714805901e-01 6.405818144094436173e-01 +5.377985006631785803e-01 5.992773867217912054e-01 6.459553074236056291e-01 +5.460310568089291605e-01 6.057538951510261782e-01 6.513591302487201640e-01 +5.542803602235417681e-01 6.122589708601943181e-01 6.567960616850564426e-01 +5.625427909572455754e-01 6.187941687382881861e-01 6.622712272448196824e-01 +5.708318382965930082e-01 6.253570561449082188e-01 6.677719395169281480e-01 +5.791326606499368479e-01 6.319518087895650282e-01 6.733150010032186161e-01 +5.874594162608378634e-01 6.385758077347706285e-01 6.788869295566190010e-01 +5.958021954354665306e-01 6.452321052037962579e-01 6.844994504225663245e-01 +6.041669493667392032e-01 6.519200031142581286e-01 6.901476288957911764e-01 +6.125605719486232337e-01 6.586385467570500252e-01 6.958254420726305289e-01 +6.209702599139194090e-01 6.653915355400340514e-01 7.015478000189213637e-01 +6.294086543235715148e-01 6.721766263526947061e-01 7.073025514622064414e-01 +6.378691230472761653e-01 6.789961486811091351e-01 7.130980827587862780e-01 +6.463529402277414793e-01 6.858505203730194122e-01 7.189343580950778856e-01 +6.548667336608775535e-01 6.927388303718031715e-01 7.248055449230874636e-01 +6.634047329440709850e-01 6.996632326198537477e-01 7.307191763991576217e-01 +6.719706356478575282e-01 7.066235438274829361e-01 7.366725743067246146e-01 +6.805691273316444301e-01 7.136193210595811465e-01 7.426619469578672472e-01 +6.891901686164448870e-01 7.206538297392898196e-01 7.486995567627365844e-01 +6.978417441976546565e-01 7.277258099214434228e-01 7.547780354337728648e-01 +7.065266827690414031e-01 7.348352863051689221e-01 7.608955968203486853e-01 +7.152395659488615109e-01 7.419843878319358765e-01 7.670595168287617227e-01 +7.239821407052556834e-01 7.491734241473727574e-01 7.732692164928602896e-01 +7.327590970387688474e-01 7.564019312463790001e-01 7.795208278459410112e-01 +7.415714112445037642e-01 7.636703716037079870e-01 7.858145260879668692e-01 +7.504112152902991939e-01 7.709814701087125410e-01 7.921602549877707622e-01 +7.592858091842216162e-01 7.783339526866095426e-01 7.985510124613616201e-01 +7.681958083667864701e-01 7.857281516038946423e-01 8.049869935018724165e-01 +7.771415943289318173e-01 7.931642615485536840e-01 8.114683168046802342e-01 +7.861210234635496175e-01 8.006428249211288151e-01 8.179973940806203325e-01 +7.951301023947144886e-01 8.081643845947440452e-01 8.245778955860991744e-01 +8.041728469938760337e-01 8.157266105617665408e-01 8.312032233576642781e-01 +8.132456568435891819e-01 8.233280673585187115e-01 8.378734408880845752e-01 +8.223487919825404058e-01 8.309646782111167473e-01 8.445815347091445435e-01 +8.314739162371332926e-01 8.386323940000459665e-01 8.513263697699344767e-01 +8.406130156021551780e-01 8.463239863842642041e-01 8.581012298825883011e-01 +8.497544923553936869e-01 8.540290636742366992e-01 8.648964939043677358e-01 +8.588848363304528721e-01 8.617324046759308187e-01 8.716956826827835236e-01 +8.679835640163260368e-01 8.694139530371515212e-01 8.784788921095023628e-01 +8.770201283066206832e-01 8.770482020713447069e-01 8.852238656983413279e-01 +8.859648522194258913e-01 8.845997703979764371e-01 8.918910598190278316e-01 +8.947687008355051930e-01 8.920276102541201402e-01 8.984445530744430419e-01 +9.033850238565973578e-01 8.992781133601027710e-01 9.048255526813022698e-01 +9.117454267355319386e-01 9.062912781484097069e-01 9.109792984365244761e-01 +9.197772674046712504e-01 9.129962371365842877e-01 9.168355520637951894e-01 +9.273989381574117008e-01 9.193137785263337802e-01 9.223160826098045773e-01 +9.345265056154450356e-01 9.251567923877340727e-01 9.273308757297369365e-01 +9.410568294999761552e-01 9.304383120413204367e-01 9.318033109548278237e-01 +9.469054517188711939e-01 9.350653892052174232e-01 9.356338452806639561e-01 +9.519782306847331954e-01 9.389521024465230514e-01 9.387414682758670192e-01 +9.561855219785392324e-01 9.420212349770757942e-01 9.410568432390962190e-01 +9.594583919916889192e-01 9.442053410129402913e-01 9.425129916890260251e-01 +9.617359608985257546e-01 9.454553544501299589e-01 9.430685634745854529e-01 +9.629655575123797773e-01 9.457446361853111272e-01 9.427146073591580189e-01 +9.629717304152120017e-01 9.451630117299317790e-01 9.411078740469980275e-01 +9.619086196808096512e-01 9.436969537999753133e-01 9.379427077261371926e-01 +9.599163272304170880e-01 9.412870435035790573e-01 9.337158672983336682e-01 +9.570384080931425563e-01 9.379846152444032414e-01 9.285135912753641474e-01 +9.533354457428268036e-01 9.338571023316933895e-01 9.224353821916627671e-01 +9.488865060103991445e-01 9.289840890976138743e-01 9.155685277230518615e-01 +9.437794827762752137e-01 9.234529155688914193e-01 9.080043258769950887e-01 +9.381021433775925678e-01 9.173543171347293690e-01 8.998514836828582775e-01 +9.319492013404071518e-01 9.107783993290641256e-01 8.911882560099286810e-01 +9.254038313424192141e-01 9.038112443270013285e-01 8.821180550321400249e-01 +9.185496533096065841e-01 8.965322509059643341e-01 8.727092681908217298e-01 +9.114540331246678839e-01 8.890124126067980859e-01 8.630519170031795140e-01 +9.041820632910790856e-01 8.813132734312176808e-01 8.531979805537907025e-01 +8.967869578435456734e-01 8.734867291901790010e-01 8.431978773211421530e-01 +8.893098149893794435e-01 8.655753876269207669e-01 8.331030513350975442e-01 +8.817848418192094639e-01 8.576132802667703059e-01 8.229492517613266056e-01 +8.742401985712474621e-01 8.496268650289525715e-01 8.127582978377587697e-01 +8.666945370128648074e-01 8.416362324606945222e-01 8.025572922175608914e-01 +8.591642949649661576e-01 8.336561546444334336e-01 7.923557697274130618e-01 +8.516606462490278195e-01 8.256972216872984216e-01 7.821629896098961643e-01 +8.441881675648532646e-01 8.177668584523517525e-01 7.719978747167733912e-01 +8.367546003836178192e-01 8.098699298493980958e-01 7.618548556771399527e-01 +8.293628053720738524e-01 8.020095841729102393e-01 7.517385870991303287e-01 +8.220122974103521996e-01 7.941877657343777708e-01 7.416604820361886174e-01 +8.147055831041186691e-01 7.864054338886661277e-01 7.316158935999518276e-01 +8.074428695046120819e-01 7.786629991741689238e-01 7.216062017816766705e-01 +8.002239536861533997e-01 7.709604828947951294e-01 7.116324410842282955e-01 +7.930486047248805903e-01 7.632976487972781277e-01 7.016945092401379869e-01 +7.859155444098100407e-01 7.556741407493390295e-01 6.917956122566603083e-01 +7.788239785472398369e-01 7.480894917424205648e-01 6.819365996758520732e-01 +7.717761666842225532e-01 7.405430431500328314e-01 6.721061511286441359e-01 +7.647695126504651109e-01 7.330343101062176681e-01 6.623117248985945782e-01 +7.578024759469249583e-01 7.255627582077430748e-01 6.525565861539863732e-01 +7.508747011746044198e-01 7.181277940669236193e-01 6.428393514066714776e-01 +7.439860296366358483e-01 7.107288105275537671e-01 6.331578659286328792e-01 +7.371380352230317845e-01 7.033650997305714858e-01 6.235032380461981161e-01 +7.303267295539673798e-01 6.960362660858002704e-01 6.138882457032197593e-01 +7.235516370761116978e-01 6.887417344158411892e-01 6.043120048450656423e-01 +7.168136574616641443e-01 6.814808447026716731e-01 5.947682975771849678e-01 +7.101132300652239770e-01 6.742529573780132734e-01 5.852527166373640011e-01 +7.034464832580180627e-01 6.670577263264326762e-01 5.757776499898806799e-01 +6.968134241386333416e-01 6.598945644190796767e-01 5.663404055906162693e-01 +6.902175511682563380e-01 6.527626219057073298e-01 5.569247166393624937e-01 +6.836530241251399520e-01 6.456617329968893371e-01 5.475506786771059398e-01 +6.771191923792275746e-01 6.385913765706551226e-01 5.382182031186726334e-01 +6.706213406334817773e-01 6.315505441676552145e-01 5.289041000996647091e-01 +6.641534350911151297e-01 6.245391367090507018e-01 5.196292578451316979e-01 +6.577148635275871236e-01 6.175566394334415232e-01 5.103934681036723653e-01 +6.513106015597026621e-01 6.106020304081083427e-01 5.011747507363846221e-01 +6.449339394177714402e-01 6.036753299959042307e-01 4.919966626063084214e-01 +6.385861657554016135e-01 5.967758543247165814e-01 4.828515990278902659e-01 +6.322678284337878152e-01 5.899029749242099552e-01 4.737348355247164577e-01 +6.259767255318442469e-01 5.830569263656453227e-01 4.646452891563762067e-01 +6.197016579332955688e-01 5.762398779913381341e-01 4.556052788341879434e-01 +6.134474028946137469e-01 5.694504347953359691e-01 4.465979423650075497e-01 +6.072178659159134240e-01 5.626871366850844103e-01 4.376111326566481941e-01 +6.010012505217495749e-01 5.559520936787821777e-01 4.286719487404299644e-01 +5.948055640046073789e-01 5.492429546962157572e-01 4.197575498195730836e-01 +5.886326075840858651e-01 5.425588558149744278e-01 4.108591465488395378e-01 +5.824702130202078498e-01 5.359018268492113934e-01 4.020079470557531565e-01 +5.763248263841350694e-01 5.292699281179926718e-01 3.931837482598241618e-01 +5.701972311820494577e-01 5.226623693222695044e-01 3.843824114977716366e-01 +5.640831336223245396e-01 5.160796590123359895e-01 3.756116269725132129e-01 +5.579774433964941327e-01 5.095224539424874077e-01 3.668822207066750885e-01 +5.518860265359687434e-01 5.029888698004121306e-01 3.581753826709989652e-01 +5.458070559295251645e-01 4.964787819395978796e-01 3.494931200704951557e-01 +5.397391255491313933e-01 4.899920506546056598e-01 3.408352402134943726e-01 +5.336730625437067221e-01 4.835304037810426725e-01 3.322231435985951165e-01 +5.276152444526773788e-01 4.770918383518058525e-01 3.236356057173125356e-01 +5.215648631466205387e-01 4.706762498171280229e-01 3.150682292920859440e-01 +5.155189794095078604e-01 4.642837707070938680e-01 3.065265223389798677e-01 +5.094751216031231378e-01 4.579145264501231494e-01 2.980134272377937266e-01 +5.034310278715931064e-01 4.515686733480185899e-01 2.895302566325898552e-01 +4.973847636608849654e-01 4.452464140846874030e-01 2.810755531259728768e-01 +4.913352410442906604e-01 4.389480201490584821e-01 2.726410128949737222e-01 +4.852774212045994351e-01 4.326740360757653225e-01 2.642407735080369302e-01 +4.792095319460407121e-01 4.264249820482975961e-01 2.558674925325885585e-01 +4.731283857839347351e-01 4.202016073968968812e-01 2.475197805445442101e-01 +4.670296949396188224e-01 4.140048440647509653e-01 2.392012072518971966e-01 +4.609095096289907434e-01 4.078358796897652017e-01 2.309089502347338452e-01 +4.547601620003904332e-01 4.016973741434559098e-01 2.226435585187958033e-01 +4.485682425668168771e-01 3.955931855786054552e-01 2.144296211245620976e-01 +4.423342563272031902e-01 3.895240159345254582e-01 2.062390835191822425e-01 +4.360296791131279548e-01 3.834992742811840771e-01 1.981208646399195139e-01 +4.296458451439821302e-01 3.775230805131955525e-01 1.900605950657147936e-01 +4.231474637241839920e-01 3.716087794574343128e-01 1.820957501112273613e-01 +4.164868167567738477e-01 3.657737180218046391e-01 1.742972729554080058e-01 +4.095973903281860951e-01 3.600427549828760787e-01 1.667592074668843294e-01 +4.023838616513769062e-01 3.544471779032521419e-01 1.597054883781360846e-01 +3.947814112345453541e-01 3.489995705485997579e-01 1.534550340717726336e-01 +3.868766298266183568e-01 3.436490149527227644e-01 1.482247271514051945e-01 +3.788659234446942747e-01 3.383142918487055395e-01 1.438533685673206441e-01 +3.708789643993818941e-01 3.329519259272508136e-01 1.400354190966675849e-01 +3.629572903164399733e-01 3.275541151937279016e-01 1.365461363519130944e-01 +3.551085081353937412e-01 3.221231228094754706e-01 1.332624917481727012e-01 +3.473247934253401170e-01 3.166654234722757755e-01 1.301119558630651207e-01 +3.396071981367110304e-01 3.111828368128046196e-01 1.270354172742856058e-01 +3.319394021514575632e-01 3.056815149128923048e-01 1.240384908643338280e-01 +3.243282276863680424e-01 3.001605128554065693e-01 1.210640172441826978e-01 +3.167622056152286647e-01 2.946237048061004504e-01 1.181174627342822525e-01 +3.092325069255885128e-01 2.890737927737177526e-01 1.152025540049777530e-01 +3.017324462072743518e-01 2.835140481503690690e-01 1.122895803439803164e-01 +2.942527745713884313e-01 2.779485572093680079e-01 1.093519738743563285e-01 +2.867898062904237211e-01 2.723775024827345681e-01 1.063941382240281286e-01 +2.793462654071084406e-01 2.667988809657529936e-01 1.034093116060303130e-01 +2.719194579070843831e-01 2.612124593378840620e-01 1.004000094727539039e-01 +2.645072257635520119e-01 2.556177666826844330e-01 9.736769715746559917e-02 +2.571104715415328812e-01 2.500132794565106398e-01 9.430849274229180512e-02 +2.497278694500691398e-01 2.443981535173898045e-01 9.122222486885092629e-02 +2.423563418593929208e-01 2.387720412133358949e-01 8.811155590734742749e-02 +2.350006052093227549e-01 2.331320446993035422e-01 8.496581087820043177e-02 +2.276523216303719677e-01 2.274793513535450784e-01 8.179625154164907319e-02 +2.203179455088669636e-01 2.218103948803600289e-01 7.858901255132699770e-02 +2.129902634426870667e-01 2.161258230519468304e-01 7.535305204258735401e-02 +2.056701553920205483e-01 2.104236534304168016e-01 7.208351221952713495e-02 +1.983573399507774226e-01 2.047021786467214111e-01 6.877728527916648904e-02 +1.910498721129175737e-01 1.989600929322370426e-01 6.543378475478747736e-02 +1.837444391314300429e-01 1.931963704923697345e-01 6.205437817912465986e-02 +1.764424601043844409e-01 1.874084358013911600e-01 5.863230865340122305e-02 +1.691401736478186091e-01 1.815951106612115895e-01 5.516899293098562890e-02 +1.618355962290499162e-01 1.757545129863619104e-01 5.166248843687707565e-02 +1.545273276784393246e-01 1.698844060286744673e-01 4.810942800782175982e-02 +1.472136064507999498e-01 1.639824533449356636e-01 4.450649296503813440e-02 +1.398915640220567136e-01 1.580463968635001659e-01 4.085151092791106803e-02 +1.325571921668454445e-01 1.520740186438245822e-01 3.716809665985362082e-02 +1.252084444586500644e-01 1.460622428214301272e-01 3.362553317766520805e-02 +1.178384206042670801e-01 1.400089579293633535e-01 3.023931012520724576e-02 +1.104210154536264532e-01 1.339166670121798297e-01 2.703939689144004010e-02 diff --git a/cmocean/rgb/diff.jscm b/cmocean/rgb/diff.jscm new file mode 100644 index 0000000..8139c48 --- /dev/null +++ b/cmocean/rgb/diff.jscm @@ -0,0 +1,38 @@ +{ + "content-type": "application/vnd.matplotlib.colormap-v1+json", + "name": "rain_anomaly3b", + "license": "http://creativecommons.org/publicdomain/zero/1.0/", + "usage-hints": [ + "red-green-colorblind-safe", + "greyscale-safe", + "diverging" + ], + "colorspace": "sRGB", + "domain": "continuous", + "colors": "0823400925420a26440b28450c2a470c2c490d2d4b0e2f4d0f314f103251113453113655123756133958143b5a143d5c153e5e16405f1742611843631945641a47661b48671d4a681f4c69214d6a244f6b26506c28526d2b536e2d556f2f5670315871345973365b74385c753a5e763c5f773e617841627943647a45657b47677d49687e4b6a7f4d6b804f6d81516e825370845571855873865a74875c76885e788a60798b627b8c647c8d667e8e687f906a81916c82926e8494708695728796748997768a99788c9a7b8d9b7d8f9d7f919e81929f8394a18596a28797a38999a58b9aa68d9ca78f9ea9929faa94a1ac96a3ad98a5af9aa6b09ca8b19eaab3a0abb4a3adb6a5afb7a7b1b9a9b2baabb4bcaeb6bdb0b8bfb2bac0b4bbc2b6bdc4b9bfc5bbc1c7bdc3c8bfc5cac2c6ccc4c8cdc6cacfc8ccd1cbced2cdd0d4cfd2d6d2d4d7d4d6d9d6d8dbd9dadddbdcdedddee0e0e0e2e2e2e3e4e3e5e6e5e7e8e7e8ebe9eaeceaebeeececf0edeef1eeeff3efeff4f0f0f5f1f0f5f1f0f6f1f0f6f1f0f5f1eff5f0eef4efedf3eeebf2ede9f1ebe8efeae5eee8e3ece6e1eae5dfe8e3dce7e1dae5dfd7e3ddd4e1dbd2dfd9cfddd7cddbd5cad9d3c7d7d1c5d5cfc2d3cdc0d2cbbdd0c9bbcec7b8ccc5b5cac3b3c8c1b0c7bfaec5bdabc3bba9c1b9a6bfb7a4beb5a1bcb39fbab19db9b09ab7ae98b5ac95b3aa93b2a890b0a68eaea58cada389aba187a99f85a89d82a69c80a49a7da3987ba19679a095769e93749c91729b8f70998e6d988c6b968a699589679387649185629084608e825e8d805b8b7f598a7d57887b55877a5385785083764e82754c80734a7f72487d70467c6e437a6d41796b3f776a3d76683b7466397265377163356f62336e60306c5f2e6a5d2c685c2b675a296559276358266156255f55245d54235b5222595121574f20554e20534d1f514b1e4f4a1d4d481d4b471c49451b47441a45431a434119424018403e173e3d163c3b163a3a153839143637133436123334123133112f31102d300f2b2e0e292d0d272b0c262a0b24280a2227092025091e24081c2207", + "extensions": { + "https://matplotlib.org/viscm": { + "min_Jp": 100, + "max_Jp": 15, + "xp": [ + -1.7830585235845149, + -13.024664298219903, + 0, + 0.3397407516725792, + -5.3330392945219955 + ], + "yp": [ + -13.994320030766502, + -18.431795994438367, + 0, + 18.939393939393938, + 10.855545365795933 + ], + "fixed": 2, + "filter_k": 25.644840365177174, + "cmtype": "diverging", + "uniform_colorspace": "CAM02-UCS", + "spline_method": "CatmulClark" + } + } +} \ No newline at end of file diff --git a/cmocean/rgb/rain-rgb.txt b/cmocean/rgb/rain-rgb.txt new file mode 100644 index 0000000..e6e190d --- /dev/null +++ b/cmocean/rgb/rain-rgb.txt @@ -0,0 +1,256 @@ +9.345899218079473103e-01 9.308468535401923649e-01 9.527121598234155053e-01 +9.317427384147130009e-01 9.265559169859566291e-01 9.461412847112190549e-01 +9.288323151212234396e-01 9.222903185306413620e-01 9.397258851930316848e-01 +9.259014656554976908e-01 9.180422099085187027e-01 9.333811647328228434e-01 +9.229490910874459386e-01 9.138118271011793636e-01 9.271087656276950639e-01 +9.199777474389575493e-01 9.095987388769878335e-01 9.209029155030628022e-01 +9.169834318717224875e-01 9.054037550731951489e-01 9.147707495523473842e-01 +9.139687227512254264e-01 9.012264798371935060e-01 9.087060404880972220e-01 +9.109285940266572679e-01 8.970679577253415360e-01 9.027176878689184836e-01 +9.078584183128727281e-01 8.929291295619988800e-01 8.968142426813552337e-01 +9.047531063535361184e-01 8.888107271516731966e-01 8.910081776220351024e-01 +9.016111241776750829e-01 8.847109979588536621e-01 8.853222084733923802e-01 +8.984773600020180551e-01 8.806072441106347348e-01 8.798005863890318023e-01 +8.957156578807984326e-01 8.763733055795923654e-01 8.742439953591307766e-01 +8.934429895784954390e-01 8.720376849990935098e-01 8.679132827136474271e-01 +8.911862289430210193e-01 8.677553071034195264e-01 8.611451293770118198e-01 +8.889359451831089221e-01 8.635014856893418189e-01 8.542095914675652546e-01 +8.867116938006094351e-01 8.592609509355686459e-01 8.471741066544885568e-01 +8.845266087736632921e-01 8.550269405833543779e-01 8.400488385945689140e-01 +8.823737459191345334e-01 8.507991274319443020e-01 8.328611900775441113e-01 +8.802551767793974635e-01 8.465759973509723313e-01 8.256144073735601774e-01 +8.781723156295014876e-01 8.423565112404021171e-01 8.183096182593350143e-01 +8.761185057025142608e-01 8.381415609718929627e-01 8.109618862038079357e-01 +8.740930473614691998e-01 8.339308508975332712e-01 8.035739688319240015e-01 +8.720952068860511330e-01 8.297241543120810192e-01 7.961481162736230299e-01 +8.701280658536796331e-01 8.255204305809771270e-01 7.886787238448926818e-01 +8.681860361945246130e-01 8.213205960844648379e-01 7.811769076946536439e-01 +8.662688819092574377e-01 8.171244030607883735e-01 7.736431720476375506e-01 +8.643746025935312716e-01 8.129320197586197283e-01 7.660813810727764572e-01 +8.625034879855904002e-01 8.087431068747142904e-01 7.584907829855329631e-01 +8.606546147206539654e-01 8.045576097831967921e-01 7.508729509413730741e-01 +8.588266729702948021e-01 8.003755742930238615e-01 7.432301838409289818e-01 +8.569623869913148839e-01 7.962191366375533930e-01 7.355859431728856146e-01 +8.550504938518290743e-01 7.920970771858082404e-01 7.278998746292554278e-01 +8.530849581648412006e-01 7.880123772917803082e-01 7.201683837184543746e-01 +8.510553489556228479e-01 7.839691860217244956e-01 7.123959661845170599e-01 +8.489330228346508855e-01 7.799787143731991002e-01 7.045972788504087925e-01 +8.467217087867040526e-01 7.760402896946996254e-01 6.967642500138357953e-01 +8.444094675146763818e-01 7.721590919106836592e-01 6.888992560450724056e-01 +8.419826946126204303e-01 7.683408791881058963e-01 6.810067521686843373e-01 +8.393858369850137890e-01 7.646065720377731578e-01 6.731281946153443441e-01 +8.366346261960659891e-01 7.609512703952114876e-01 6.652451363576846743e-01 +8.336844747046829873e-01 7.573915193569474846e-01 6.573955009267002936e-01 +8.305100496696308232e-01 7.539367518776275423e-01 6.496025429014220531e-01 +8.270795595522559829e-01 7.505979386186598656e-01 6.419039537235261550e-01 +8.233795339766563082e-01 7.473786068829111340e-01 6.343290132703457429e-01 +8.193527781515338448e-01 7.442973494709732574e-01 6.269543660928612594e-01 +8.150187381418861898e-01 7.413436869430644061e-01 6.197992186956774452e-01 +8.103671933740643762e-01 7.385171999523609809e-01 6.129154791955783166e-01 +8.053792270659873020e-01 7.358201042585071905e-01 6.063662921639977332e-01 +8.001091487009975856e-01 7.332281055474541009e-01 6.001460682932164836e-01 +7.945789023747689139e-01 7.307291829728559396e-01 5.942715305031909256e-01 +7.888006960769626819e-01 7.283155171589156263e-01 5.887591680450797726e-01 +7.828500773466386953e-01 7.259575374530320424e-01 5.835578074632412626e-01 +7.767061505166655833e-01 7.236609437130246958e-01 5.786949863565322705e-01 +7.704515166608618681e-01 7.213952841209190225e-01 5.740985082128049477e-01 +7.640735967706561160e-01 7.191644341873529855e-01 5.697767469661422224e-01 +7.576101573082332230e-01 7.169548408227417458e-01 5.656900597267850994e-01 +7.510868163729491620e-01 7.147576249864890929e-01 5.618076267722970085e-01 +7.445073291928260284e-01 7.125716412063957117e-01 5.581177337866775057e-01 +7.378726341804960898e-01 7.103967525656292858e-01 5.546105609434751615e-01 +7.312079622811540336e-01 7.082247740235839695e-01 5.512528292120718598e-01 +7.245223864166319139e-01 7.060527915800670629e-01 5.480303444985812344e-01 +7.178179126910454455e-01 7.038807344069457628e-01 5.449299707841194218e-01 +7.111005957174848513e-01 7.017068393561574080e-01 5.419396078954504814e-01 +7.043748082863551252e-01 6.995299965106114293e-01 5.390480504976655762e-01 +6.976428841540770476e-01 6.973498542230505137e-01 5.362451349156007741e-01 +6.909082389019516324e-01 6.951656049847189101e-01 5.335213672589386169e-01 +6.841729694681116802e-01 6.929769158960692454e-01 5.308681129719833303e-01 +6.774389689374403778e-01 6.907834967201277321e-01 5.282774232028493167e-01 +6.707084440130518521e-01 6.885849153944831880e-01 5.257418638258782861e-01 +6.639830918601468124e-01 6.863809064730829190e-01 5.232546086946955333e-01 +6.572628938239016838e-01 6.841717926007404582e-01 5.208097057295569821e-01 +6.505310175956583452e-01 6.819627798840676158e-01 5.184181252103758908e-01 +6.438052208637921048e-01 6.797486679084566719e-01 5.160591646972285673e-01 +6.370832823378153043e-01 6.775304469295674314e-01 5.137285370282342889e-01 +6.303705085075785863e-01 6.753064791862326555e-01 5.114205507376848869e-01 +6.236618961603839217e-01 6.730786409287115024e-01 5.091324121853675333e-01 +6.169335288716588650e-01 6.708537547863058226e-01 5.068827462564762243e-01 +6.102104324218552422e-01 6.686246254359063945e-01 5.046462757174120517e-01 +6.034898306929903367e-01 6.663922665431509795e-01 5.024201930501221991e-01 +5.967676345670763771e-01 6.641578140003113750e-01 5.002054482667135371e-01 +5.900234330755329548e-01 6.619267690502547152e-01 4.980175294001410458e-01 +5.832786395653163369e-01 6.596933136673572839e-01 4.958328661006338733e-01 +5.765340663187056292e-01 6.574571405303393234e-01 4.936489952759946509e-01 +5.697582662671993869e-01 6.552266499575032377e-01 4.914884851056534054e-01 +5.629730101905379147e-01 6.529958318145387963e-01 4.893302200215370878e-01 +5.561847270851512093e-01 6.507627829419350141e-01 4.871678208383450337e-01 +5.493551097307179942e-01 6.485375215149538075e-01 4.850265872147694890e-01 +5.425256305514831734e-01 6.463076874918682879e-01 4.828887171920029364e-01 +5.356612977693596678e-01 6.440835181737865067e-01 4.807599721985225671e-01 +5.287922197832997107e-01 6.418536560641270317e-01 4.786600904179345028e-01 +5.218850344197893953e-01 6.396291731218471943e-01 4.765733407479101902e-01 +5.149376539505706729e-01 6.374099915253575999e-01 4.745006244225868364e-01 +5.079766080089844760e-01 6.351862479551418916e-01 4.724595195428232253e-01 +5.009755431565769968e-01 6.329662155198152451e-01 4.704378162646060679e-01 +4.939285311779693655e-01 6.307509252620584483e-01 4.684356727521749586e-01 +4.868490205117793068e-01 6.285349533886431805e-01 4.664642845323079823e-01 +4.797346535241335252e-01 6.263183759111613513e-01 4.645235778249863778e-01 +4.725684462540446495e-01 6.241056609282084056e-01 4.626084796977160685e-01 +4.653487483821732718e-01 6.218962626011749206e-01 4.607211778296827487e-01 +4.580958304602617548e-01 6.196828431511897106e-01 4.588752179328909331e-01 +4.507924598809112671e-01 6.174698402959368781e-01 4.570641185207933721e-01 +4.434287999890613730e-01 6.152589986197224414e-01 4.552877084880677105e-01 +4.360045483020283386e-01 6.130492733714320019e-01 4.535480340189612103e-01 +4.285254867993349426e-01 6.108377350391323013e-01 4.518515677783579432e-01 +4.209986373257934011e-01 6.086212623350139017e-01 4.502044135688367255e-01 +4.134050226321455135e-01 6.064040523424363283e-01 4.486012173551829352e-01 +4.057442294957287476e-01 6.041849412176459877e-01 4.470442374703665345e-01 +3.980103804981384719e-01 6.019638983605486438e-01 4.455375274544488007e-01 +3.902063406549050040e-01 5.997389567937310151e-01 4.440824403586798308e-01 +3.823330219069303038e-01 5.975084478594807624e-01 4.426827692274404313e-01 +3.743994820234466392e-01 5.952685939479632760e-01 4.413464089373288490e-01 +3.663895342858319859e-01 5.930221303804210642e-01 4.400695063624517345e-01 +3.583027331816978078e-01 5.907676584219552218e-01 4.388545840675231458e-01 +3.501387968837356146e-01 5.885037242420276815e-01 4.377041322664636525e-01 +3.418974318117430355e-01 5.862288538856508247e-01 4.366206692939140765e-01 +3.335788357145262895e-01 5.839414671596280249e-01 4.356065575056938810e-01 +3.251833166933908448e-01 5.816399536413853211e-01 4.346641338993996184e-01 +3.167127839080131069e-01 5.793224392963164382e-01 4.337951239114763990e-01 +3.081690890879107969e-01 5.769870856598143805e-01 4.330012470667766733e-01 +2.995554017471688812e-01 5.746318865559506550e-01 4.322836619258556556e-01 +2.908749326626684506e-01 5.722548869131893756e-01 4.316434590630243706e-01 +2.821317603555529852e-01 5.698540727656976612e-01 4.310813189213763552e-01 +2.733327132702973450e-01 5.674271544637526921e-01 4.305966557525391369e-01 +2.644844543662756564e-01 5.649720080402284017e-01 4.301888298931589305e-01 +2.555934335426425785e-01 5.624866759386734083e-01 4.298572085857526592e-01 +2.466705752105852745e-01 5.599688410786282100e-01 4.295989836123562111e-01 +2.377250969065505815e-01 5.574166090031631438e-01 4.294119794031988069e-01 +2.287974288505327247e-01 5.548237349096721838e-01 4.292976581628650257e-01 +2.198778468774868489e-01 5.521921840191843511e-01 4.292473634163982976e-01 +2.109782428379559649e-01 5.495207384038700571e-01 4.292558006274433957e-01 +2.021129920761091103e-01 5.468081421831656463e-01 4.293174959448664008e-01 +1.932970840289524594e-01 5.440534055393755342e-01 4.294264526279761851e-01 +1.845458994968318112e-01 5.412558313792091846e-01 4.295762645205056240e-01 +1.758747242186788073e-01 5.384150471574241648e-01 4.297604082769522771e-01 +1.672992650076766952e-01 5.355309682751767664e-01 4.299719066013750202e-01 +1.588637533307953875e-01 5.326007152638789766e-01 4.302077664091210063e-01 +1.505683016211286918e-01 5.296267950764182997e-01 4.304586487604788458e-01 +1.424122559523727238e-01 5.266116064108816719e-01 4.307170632116699704e-01 +1.344085890794944338e-01 5.235562755642496624e-01 4.309766346935359205e-01 +1.265690627070247265e-01 5.204621553185740934e-01 4.312317121888489257e-01 +1.189042023704675322e-01 5.173307669769749984e-01 4.314776038001592595e-01 +1.114246335252623010e-01 5.141637863856259871e-01 4.317091179175960858e-01 +1.041396630107440102e-01 5.109629971472293697e-01 4.319221604647225932e-01 +9.705780332103111641e-02 5.077302369436778040e-01 4.321134999997184867e-01 +9.018737534593762595e-02 5.044674058535019157e-01 4.322799148264460101e-01 +8.353621797943017180e-02 5.011764305824176757e-01 4.324186435951988816e-01 +7.711177607780977938e-02 4.978592446938872595e-01 4.325273326417442554e-01 +7.092118659398483071e-02 4.945177606318418850e-01 4.326041097483195319e-01 +6.497112946544478240e-02 4.911539160136639270e-01 4.326469613219918742e-01 +5.926836252985791947e-02 4.877695081001428012e-01 4.326551664213393877e-01 +5.381952845223608034e-02 4.843663141865421351e-01 4.326279059471102584e-01 +4.863121397792258965e-02 4.809460446320443228e-01 4.325646545440974822e-01 +4.370962682231178259e-02 4.775103648435110038e-01 4.324649641775900610e-01 +3.905112341714592900e-02 4.740608794693825234e-01 4.323285604649402813e-01 +3.496888770654411893e-02 4.705940487017962748e-01 4.321582669839647561e-01 +3.143475353593022659e-02 4.671148853349996188e-01 4.319569510186779815e-01 +2.822939081579376591e-02 4.636310861634273528e-01 4.317228454236091695e-01 +2.532316922257733458e-02 4.601429344885760719e-01 4.314611817794063997e-01 +2.271621196496529868e-02 4.566502451321696188e-01 4.311704916368828688e-01 +2.041021909707332535e-02 4.531526976651161776e-01 4.308500436842361836e-01 +1.840750332198089895e-02 4.496499166924270985e-01 4.304993286811824582e-01 +1.672948316457980103e-02 4.461408970806849950e-01 4.301165746135667267e-01 +1.538958862814012937e-02 4.426249994353490536e-01 4.296990539873294934e-01 +1.435413070644788770e-02 4.391028750771387434e-01 4.292495981309878972e-01 +1.362474263231045098e-02 4.355741563391084537e-01 4.287674174473046218e-01 +1.320277209836126682e-02 4.320384817616971795e-01 4.282516463471394697e-01 +1.308981022524788491e-02 4.284954582700414294e-01 4.277015087056333931e-01 +1.328604261598065328e-02 4.249447744648222614e-01 4.271158498149437155e-01 +1.379162556189269216e-02 4.213861028127094399e-01 4.264935743343106211e-01 +1.460601943539846688e-02 4.178191447440461337e-01 4.258334705527410113e-01 +1.572829683901560624e-02 4.142436086986017174e-01 4.251343095806048300e-01 +1.715690277980158954e-02 4.106592256461835122e-01 4.243947975574930975e-01 +1.888987211594707338e-02 4.070657340951429060e-01 4.236136390627659454e-01 +2.092392860184388512e-02 4.034629389123669529e-01 4.227893563025114654e-01 +2.325551642690237841e-02 3.998506428553240677e-01 4.219205349032726371e-01 +2.587976864011615197e-02 3.962287140215077774e-01 4.210056239775798459e-01 +2.879190433075056593e-02 3.925969951003727698e-01 4.200432223313694258e-01 +3.198535565039070661e-02 3.889554251322902556e-01 4.190317351172953564e-01 +3.545196060096311025e-02 3.853040266354982313e-01 4.179694561300110189e-01 +3.918323414610008770e-02 3.816428245764514893e-01 4.168548033419602339e-01 +4.307413522281567514e-02 3.779718375548203335e-01 4.156863315515785251e-01 +4.697176598438539824e-02 3.742911911603020725e-01 4.144624688814931845e-01 +5.086969232374114608e-02 3.706011159074634187e-01 4.131815676575790186e-01 +5.475506718563923764e-02 3.669018229746837667e-01 4.118421970922833131e-01 +5.861718450656796392e-02 3.631935427420149298e-01 4.104430479071176641e-01 +6.244486447080809660e-02 3.594767157385404532e-01 4.089825820635137332e-01 +6.623026614707036575e-02 3.557516605834906143e-01 4.074596950461942813e-01 +6.998642301215993178e-02 3.520178004091850665e-01 4.058682797037249657e-01 +7.368349105094931795e-02 3.482766831924774542e-01 4.042119944889063232e-01 +7.731558236370641990e-02 3.445288253637411868e-01 4.024900881431115462e-01 +8.087676210173380675e-02 3.407748586458358986e-01 4.007018083483494530e-01 +8.436223121714692130e-02 3.370153951525706182e-01 3.988466436336530196e-01 +8.776750670667690657e-02 3.332510976549885595e-01 3.969242240138116662e-01 +9.108869400118912996e-02 3.294826406371675898e-01 3.949343703704463748e-01 +9.432201977980475549e-02 3.257107550258697137e-01 3.928770441587735585e-01 +9.746469555428810549e-02 3.219361155964274857e-01 3.907524596946260753e-01 +1.005137065660947904e-01 3.181594785366577693e-01 3.885609392070024093e-01 +1.034667829102825787e-01 3.143815541170876804e-01 3.863030299565164416e-01 +1.063234262084384596e-01 3.106029224571804637e-01 3.839789892033815266e-01 +1.090886774331554510e-01 3.068237947954853828e-01 3.815863917579840892e-01 +1.117516829166099457e-01 3.030455295972052654e-01 3.791303642957770670e-01 +1.143116567201993838e-01 2.992687663919490482e-01 3.766121406045498943e-01 +1.167670145114603486e-01 2.954942819265780063e-01 3.740330281243106070e-01 +1.191180972380510850e-01 2.917225736922783308e-01 3.713945692144456912e-01 +1.213648735453208283e-01 2.879541937006656616e-01 3.686983734293431958e-01 +1.235072626972245069e-01 2.841897016932966036e-01 3.659461400710485868e-01 +1.255450172977832790e-01 2.804296856157670326e-01 3.631396556775801088e-01 +1.274793353662031781e-01 2.766744826581494787e-01 3.602808188600382100e-01 +1.293108779906596839e-01 2.729245043006408022e-01 3.573715653564341621e-01 +1.310404714307908669e-01 2.691801184313953876e-01 3.544138839210129732e-01 +1.326690608188904053e-01 2.654416544155482338e-01 3.514098053356367601e-01 +1.341977870856449484e-01 2.617093858425083575e-01 3.483613905337877847e-01 +1.356276601953987637e-01 2.579835900091309586e-01 3.452707288070074876e-01 +1.369600353052619901e-01 2.542644558590421155e-01 3.421399178935836116e-01 +1.381965371841252788e-01 2.505520924183904374e-01 3.389710465513224302e-01 +1.393387446776407912e-01 2.468465884786986142e-01 3.357661977904279893e-01 +1.403881322096931505e-01 2.431480256484742086e-01 3.325274517113971373e-01 +1.413463644264434660e-01 2.394564173026069165e-01 3.292568607367298839e-01 +1.422150204492807768e-01 2.357717647764656088e-01 3.259564633033559256e-01 +1.430241411872627821e-01 2.320878753057155075e-01 3.226241875019154048e-01 +1.437206808568328997e-01 2.284105260214233102e-01 3.193108148264102164e-01 +1.443167183567656553e-01 2.247376722352139033e-01 3.160160321612740519e-01 +1.448172234122950819e-01 2.210687136739122871e-01 3.127401980544551319e-01 +1.452270337553944191e-01 2.174029799543943375e-01 3.094836465796388381e-01 +1.455503303753529210e-01 2.137398650159642033e-01 3.062467330039463920e-01 +1.457916124736327868e-01 2.100785929129088681e-01 3.030297495827782850e-01 +1.459553844105018761e-01 2.064182886269750883e-01 2.998329600953320573e-01 +1.460450738341802501e-01 2.027582683855788659e-01 2.966566757283218836e-01 +1.460639705951699008e-01 1.990978105534875198e-01 2.935011720342979302e-01 +1.460132039806032178e-01 1.954367333080272440e-01 2.903667875231270012e-01 +1.458975819392981654e-01 1.917737643090239308e-01 2.872535927880979223e-01 +1.457218019293262112e-01 1.881075422549224607e-01 2.841616643549851884e-01 +1.454887645921259243e-01 1.844371298576089335e-01 2.810911343097461934e-01 +1.452032543446299950e-01 1.807609202544633309e-01 2.780420590388025248e-01 +1.448676044101755434e-01 1.770779511005421691e-01 2.750145417929056313e-01 +1.444780219943526678e-01 1.733892008568175547e-01 2.720086027887532176e-01 +1.440413431328422811e-01 1.696921848838350289e-01 2.690241039839223469e-01 +1.435643975093518765e-01 1.659841914110155581e-01 2.660610427935709565e-01 +1.430436238988290198e-01 1.622659427289601941e-01 2.631191819624335571e-01 +1.424820569142489501e-01 1.585358695252926109e-01 2.601982981359077240e-01 +1.418869430340855831e-01 1.547906985932924473e-01 2.572984244859990999e-01 +1.412504255878399562e-01 1.510326235840303566e-01 2.544186879929528633e-01 +1.405847553781910952e-01 1.472562100690701925e-01 2.515594367076940396e-01 +1.398866955406879442e-01 1.434617145934828086e-01 2.487199683062358835e-01 +1.391555552990901834e-01 1.396484041206631221e-01 2.458995874149805250e-01 +1.383972370289156262e-01 1.358126929549585971e-01 2.430982825013351944e-01 +1.376119899169210015e-01 1.319530974585303440e-01 2.403154706816485464e-01 +1.368012914537950486e-01 1.280674462139133607e-01 2.375506853082148262e-01 +1.359688085852648887e-01 1.241523347647442155e-01 2.348038243218179000e-01 +1.351079666263714507e-01 1.202088638287985289e-01 2.320731097859522474e-01 +1.342294527149119343e-01 1.162298274455028368e-01 2.293596493763065958e-01 +1.333340174081290574e-01 1.122121767595207487e-01 2.266630565550546428e-01 +1.324249399956005380e-01 1.081511805079039545e-01 2.239835024348004189e-01 +1.315721561940036699e-01 1.040055590640546201e-01 2.213363669373892839e-01 diff --git a/cmocean/rgb/rain.jscm b/cmocean/rgb/rain.jscm new file mode 100644 index 0000000..76f2f86 --- /dev/null +++ b/cmocean/rgb/rain.jscm @@ -0,0 +1,38 @@ +{ + "content-type": "application/vnd.matplotlib.colormap-v1+json", + "name": "rain4", + "license": "http://creativecommons.org/publicdomain/zero/1.0/", + "usage-hints": [ + "red-green-colorblind-safe", + "greyscale-safe", + "sequential" + ], + "colorspace": "sRGB", + "domain": "continuous", + "colors": "221b38221c39221d3a221e3a221f3b23203c23213d23223d23233e23243f24253f242640242741242742242842242943252a44252b45252c45252d46252e47252f4825304825314925324a25334b25344c25354c25364d25374e25374f253850253951253a51243b52243c53243d54243e55243f5623405623415723425822435922445a21455a21465b21475c20485d1f485d1f495e1e4a5f1e4b5f1d4c601c4d611c4e611b4f621a50631a5163195264185364175465165565165666155766145867135967125a67115b68105c680f5d690e5e690d5f690c5f6a0b606a0a616a09626b08636b07646b07656b06666c05676c05686c04696c046a6c046b6d046b6d036c6d036d6d036e6d036f6d04706d04716e04726e05736e05746e06746e06756e07766e08776e09786e0a796e0b7a6e0c7b6e0e7c6e0f7c6e117d6e127e6e147f6e15806e17816e19816e1b826e1c836e1e846e20856e22866e24866e26876e29886e2b896e2d896e2f8a6e318b6e348b6d368c6d388d6d3a8d6d3d8e6e3f8f6e418f6e43906e46916e48916e4a926e4c936e4f936e51946f53946f55956f57956f5996705b97705d97705f9871619871649971659a72679a72699b726b9b736d9c736f9c74719d74739d75759e75779f75799f767aa0767ca0777ea17780a17882a27883a37985a37a87a47a89a47b8aa57b8ca57c8ea67c90a77d91a77d93a87e95a87e96a97f98a9809aaa809caa819dab819fac82a1ac82a2ad83a4ad84a6ae84a8ae85a9af85abb086adb087aeb187b0b188b2b289b4b289b5b38ab7b38bb9b48cbab58dbcb58dbeb68ec0b68fc1b790c3b791c4b892c6b994c8b995c9ba96cbba98ccbb99cdbc9bcfbc9cd0bd9ed1bea0d2bfa2d3bfa4d4c0a6d5c1a8d5c2aad6c3acd7c4aed7c5b0d8c6b2d8c7b4d9c8b6dac9b8dacabadbcbbcdbccbedbcdbfdccec1dccfc3ddd0c5ddd1c7ded3c9ded4cbdfd5cddfd6cfe0d7d1e0d8d3e1d9d4e2dad6e2dbd8e3dcdae3dddce4dedde4dfdfe5e1e0e6e2e2e7e3e3e8e4e5e8e5e6e9e6e8eae7e9ebe8ebebe9ececeaeeedebf0eeecf1eeedf3", + "extensions": { + "https://matplotlib.org/viscm": { + "min_Jp": 15, + "max_Jp": 95, + "xp": [ + 3.8283542311160232, + -16.720716950866546, + -23.844394960620505, + 4.650317078395332, + -0.8294352368000233 + ], + "yp": [ + -13.598005370157274, + -13.598005370157274, + 7.499041043344832, + 13.800756205819482, + -3.734451202805637 + ], + "fixed": -1, + "filter_k": 10, + "cmtype": "linear", + "uniform_colorspace": "CAM02-UCS", + "spline_method": "CatmulClark" + } + } +} \ No newline at end of file diff --git a/cmocean/rgb/tarn-rgb.txt b/cmocean/rgb/tarn-rgb.txt new file mode 100644 index 0000000..5a8049f --- /dev/null +++ b/cmocean/rgb/tarn-rgb.txt @@ -0,0 +1,256 @@ +8.982325470083904473e-02 1.386884202488073425e-01 5.339634747542102572e-02 +9.490477059882479471e-02 1.456373382629968793e-01 5.489581825948507826e-02 +9.996820923335580922e-02 1.525451879246892684e-01 5.635425405965687612e-02 +1.049932629133125961e-01 1.594260027028096272e-01 5.767943871793178995e-02 +1.099844886715972414e-01 1.662815862271170841e-01 5.888156855042592924e-02 +1.149326133871393096e-01 1.731199934404946961e-01 5.990900196219744317e-02 +1.198471368660654901e-01 1.799400614735769122e-01 6.079328815375505818e-02 +1.247299637162895547e-01 1.867439924225139936e-01 6.153299800422255134e-02 +1.295805228510759355e-01 1.935349340052088807e-01 6.211473969231569997e-02 +1.343996539632437981e-01 2.003151607373700460e-01 6.253114410253807209e-02 +1.391929081922307909e-01 2.070845521371987852e-01 6.279848839795282300e-02 +1.439554110569007950e-01 2.138477306592140859e-01 6.288007868082229335e-02 +1.487348911403759133e-01 2.205914714224685436e-01 6.284098523281120285e-02 +1.535498540172954285e-01 2.273157827161538247e-01 6.260141657412987559e-02 +1.584099704346516035e-01 2.340203331404673293e-01 6.214047826160282867e-02 +1.633293887964821223e-01 2.407033599878570240e-01 6.143905222634648416e-02 +1.683325411333271293e-01 2.473603962447930571e-01 6.047333430287041983e-02 +1.734516487390746486e-01 2.539840110977820697e-01 5.924078177592304734e-02 +1.787290092053028800e-01 2.605653696981221068e-01 5.769398812038967900e-02 +1.842226903108559743e-01 2.670914347726459082e-01 5.577103201204060973e-02 +1.900442575104325516e-01 2.735335271652731270e-01 5.343902039527659992e-02 +1.964012889997470146e-01 2.798383207240314197e-01 5.059091721484253873e-02 +2.038180981569160388e-01 2.858582487774559699e-01 4.734796165359243109e-02 +2.134803580554236468e-01 2.912137742752328173e-01 4.542335962452376946e-02 +2.246379258326957618e-01 2.959985720226946948e-01 4.791967673999841110e-02 +2.357078843306291693e-01 3.007243105772285929e-01 5.139927647716215769e-02 +2.466644952616644515e-01 3.054215218481723948e-01 5.513668228793693754e-02 +2.575461415550749367e-01 3.100881502728962680e-01 5.896503676513652897e-02 +2.683585986429155579e-01 3.147286848554897709e-01 6.282164605955981029e-02 +2.791275572039774722e-01 3.193399608455813055e-01 6.667246926393996520e-02 +2.898358184319489994e-01 3.239318024263264095e-01 7.050980744893517449e-02 +3.004984152503225037e-01 3.285032192279036534e-01 7.432550653130615137e-02 +3.111553190646883515e-01 3.330438874028457952e-01 7.810231939881484564e-02 +3.218034422925408755e-01 3.375573450510525597e-01 8.184304787716339957e-02 +3.324333011718812458e-01 3.420495081780127733e-01 8.555280814984053683e-02 +3.430769162896195046e-01 3.465110261365142996e-01 8.922112292532158317e-02 +3.537299359050021241e-01 3.509453072047716837e-01 9.285241010232825332e-02 +3.643894401193512600e-01 3.553552732120655588e-01 9.645119893644621412e-02 +3.750453108858616824e-01 3.597467221513847013e-01 1.000256142638818735e-01 +3.857100245562226637e-01 3.641166297482588132e-01 1.035734980914473635e-01 +3.963858021351523986e-01 3.684657518577320601e-01 1.070973667641381966e-01 +4.071213221517259173e-01 3.727752094149718864e-01 1.105826082064781946e-01 +4.178758479312351115e-01 3.770629074315066109e-01 1.140472314573759138e-01 +4.286423372903069851e-01 3.813332614724057046e-01 1.174974726735356911e-01 +4.394433776892578969e-01 3.855777866767184925e-01 1.209275883437508081e-01 +4.502962927333878373e-01 3.897896541113713975e-01 1.243344105962937429e-01 +4.611581205683302209e-01 3.939890872463367444e-01 1.277374475879362037e-01 +4.720563913472620166e-01 3.981648558562365103e-01 1.311281116044327733e-01 +4.830210005713382881e-01 4.023038157279973936e-01 1.344963783804615232e-01 +4.939986962481786592e-01 4.064316868089741797e-01 1.378665047316342263e-01 +5.050443453644228864e-01 4.105232839216421126e-01 1.412177516567701130e-01 +5.161305471961733504e-01 4.145923196985767945e-01 1.445638179668259637e-01 +5.272226932670311950e-01 4.186568461649191053e-01 1.479227047630213288e-01 +5.384231737920478489e-01 4.226667334740543680e-01 1.512491796667267130e-01 +5.496735303963581343e-01 4.266509012024514158e-01 1.545811460866533815e-01 +5.608924552760781168e-01 4.306494794221744082e-01 1.580220317035593569e-01 +5.721888701475891237e-01 4.346087953039819429e-01 1.614907462658664583e-01 +5.835602689975579738e-01 4.385299786869343297e-01 1.649946574397075372e-01 +5.949141655760096237e-01 4.424610896723609743e-01 1.686236738948057867e-01 +6.063474969101482204e-01 4.463528192152232399e-01 1.722929976151095499e-01 +6.178322186277155348e-01 4.502196887286237792e-01 1.760393057804460759e-01 +6.293072576484797231e-01 4.540947330149664452e-01 1.799322501799610063e-01 +6.408487929862468624e-01 4.579376406332680838e-01 1.839101076250921896e-01 +6.524478209436700427e-01 4.617530075872406381e-01 1.879952778619465859e-01 +6.640840089637001231e-01 4.655519164846439462e-01 1.922225103058495532e-01 +6.757077110120256469e-01 4.693624324344119469e-01 1.966573342842017347e-01 +6.873619660726970615e-01 4.731606777592323732e-01 2.012786215471898954e-01 +6.990381205121832808e-01 4.769509785672518265e-01 2.061259388500985001e-01 +7.107469254673900450e-01 4.807250920628522439e-01 2.112467599398395457e-01 +7.224230526312156453e-01 4.845218253861356961e-01 2.167123076670600113e-01 +7.340988344738968996e-01 4.883178461040553198e-01 2.226023859070605515e-01 +7.456126256093577043e-01 4.922084125716105762e-01 2.291293878090427394e-01 +7.569950884983198680e-01 4.961693298634363702e-01 2.364236914878575235e-01 +7.680178179592376253e-01 5.003309692977765399e-01 2.449057676522546911e-01 +7.783432998143535730e-01 5.048913767328344626e-01 2.551145881355684764e-01 +7.872937751334541101e-01 5.102708429127015277e-01 2.676604181065562749e-01 +7.941838547011116356e-01 5.169436808272552808e-01 2.821513140071189585e-01 +7.994756138083272123e-01 5.246737693689591531e-01 2.970255774031809182e-01 +8.039010002452274817e-01 5.330024415850749264e-01 3.115266985520254717e-01 +8.078274978677594254e-01 5.416811012734407127e-01 3.255924452137653469e-01 +8.115188822314253203e-01 5.505337325024400874e-01 3.392264225271887645e-01 +8.149565405173153643e-01 5.595497555166275561e-01 3.527260919316282384e-01 +8.184200486555966991e-01 5.685470713353225625e-01 3.661765482687758810e-01 +8.218871005380722350e-01 5.775395855002405376e-01 3.796232120570560142e-01 +8.253524104820136875e-01 5.865320478639367563e-01 3.930813348872184143e-01 +8.288195980598317414e-01 5.955244594650943579e-01 4.065541730450397684e-01 +8.322893500409468404e-01 6.045186250474157141e-01 4.200438297618293571e-01 +8.357658919205435133e-01 6.135146821751165103e-01 4.335463882212042819e-01 +8.392529397355924514e-01 6.225129167459599877e-01 4.470604854774085646e-01 +8.427490015153409342e-01 6.315159424794672960e-01 4.605928597504284627e-01 +8.462593242877498589e-01 6.405233492783437566e-01 4.741391831670908608e-01 +8.497829397434528698e-01 6.495374502823044738e-01 4.877048504982988697e-01 +8.533243184659659031e-01 6.585581699790050703e-01 5.012868094865198243e-01 +8.568819326669031566e-01 6.675878581525517275e-01 5.148924377083944348e-01 +8.604592156604728981e-01 6.766270650074718285e-01 5.285174957354723535e-01 +8.640624159744237920e-01 6.856750887735367783e-01 5.421555222813166930e-01 +8.676874794762717835e-01 6.947353397221285309e-01 5.558159820355237368e-01 +8.713433578641075483e-01 7.038060956465443940e-01 5.694881225731345253e-01 +8.750269237065777528e-01 7.128903502475765208e-01 5.831797789138876142e-01 +8.787417347404306023e-01 7.219884934452005520e-01 5.968884207063740455e-01 +8.824929186507559642e-01 7.311003788594004904e-01 6.106091378045375162e-01 +8.862780839217170303e-01 7.402286277522096558e-01 6.243484010896452885e-01 +8.901025319225768229e-01 7.493730430239593510e-01 6.381009856311857797e-01 +8.939696421167129259e-01 7.585341679611918853e-01 6.518645964033017437e-01 +8.978784332841047711e-01 7.677140679252760780e-01 6.656434485771917098e-01 +9.018326061682566674e-01 7.769131645138506181e-01 6.794347199822515782e-01 +9.058380869535479496e-01 7.861311730497033690e-01 6.932323184728660381e-01 +9.098936269941250155e-01 7.953702376174893729e-01 7.070408050591605598e-01 +9.140018319746877618e-01 8.046311927664194785e-01 7.208589990654702406e-01 +9.181667424043119530e-01 8.139144268565462470e-01 7.346836216449236234e-01 +9.223937440297114154e-01 8.232199407988282092e-01 7.485094577713424790e-01 +9.266329848317796936e-01 8.325649094757640034e-01 7.624119242822527953e-01 +9.309587852706298072e-01 8.419294436897262202e-01 7.762663931757451952e-01 +9.353308095703787295e-01 8.513275998621367968e-01 7.901346256764255616e-01 +9.397666205989465560e-01 8.607552896628867245e-01 8.039940207918337967e-01 +9.442852447524148207e-01 8.702076963082445715e-01 8.178194726640143353e-01 +9.488564272552421075e-01 8.796932993686320534e-01 8.316532922424306751e-01 +9.535132490174164088e-01 8.891984622715306541e-01 8.454417866111457736e-01 +9.582183040236339489e-01 8.987227701762496856e-01 8.592166709390754997e-01 +9.629681108746700469e-01 9.082408064338201026e-01 8.729337059863773174e-01 +9.677369708112718572e-01 9.177061780026050108e-01 8.865286101605559521e-01 +9.724470492478461958e-01 9.270421466879262828e-01 8.999251032877214618e-01 +9.769577532404692954e-01 9.361234679319003771e-01 9.130099659367507670e-01 +9.810936756020608440e-01 9.447503559760432879e-01 9.255607060964068378e-01 +9.846187877628681528e-01 9.526495821380999152e-01 9.372697834100743863e-01 +9.872037589208276787e-01 9.594994318553785595e-01 9.478188041909386685e-01 +9.885417842181484227e-01 9.649430355113016722e-01 9.568049207415391111e-01 +9.884013930268252812e-01 9.686440358418687557e-01 9.637998740972807399e-01 +9.884162623276403492e-01 9.700501042547021724e-01 9.646078752920302923e-01 +9.882481988456427446e-01 9.691949840717196674e-01 9.590849806168054714e-01 +9.862202098271878326e-01 9.664497051565109631e-01 9.513022380762837793e-01 +9.825317256976796587e-01 9.620307807128735123e-01 9.416222408221766038e-01 +9.774953228979595954e-01 9.562506189604750295e-01 9.303982168749544979e-01 +9.714512581163280425e-01 9.494527517929901572e-01 9.180386343083645206e-01 +9.647328782040082151e-01 9.419601909858620337e-01 9.048410781832560978e-01 +9.576029833882070408e-01 9.340364327380904497e-01 8.911071594609687452e-01 +9.502540208567341606e-01 9.258747025552572785e-01 8.770597493210310347e-01 +9.428203850658012364e-01 9.176036605916164657e-01 8.628094676385467121e-01 +9.353802079259059266e-01 9.093000877222664480e-01 8.484369289828109784e-01 +9.279731512595491560e-01 9.010054158372772237e-01 8.340022711999641736e-01 +9.206162430864484048e-01 8.927397568877493139e-01 8.195491149365338179e-01 +9.133281854005529388e-01 8.845128541542209843e-01 8.050384948242300664e-01 +9.061049708588290175e-01 8.763271129727117081e-01 7.905141123067558340e-01 +8.988722526026153847e-01 8.682095990978259126e-01 7.760244884018141498e-01 +8.913604989190128114e-01 8.602593575538733939e-01 7.616936251859220963e-01 +8.834947766491649812e-01 8.525076069101691356e-01 7.475141723430621665e-01 +8.751348356324997191e-01 8.450011895094009517e-01 7.335968964229397926e-01 +8.660362122016208586e-01 8.378139590610478304e-01 7.202229230673017346e-01 +8.560628191678395504e-01 8.309783491388803567e-01 7.076282794978067114e-01 +8.450850551605781913e-01 8.245041095837670753e-01 6.962540521527236237e-01 +8.331237773418240788e-01 8.183393744081108867e-01 6.865239180889655124e-01 +8.205576283471390786e-01 8.123351983566962087e-01 6.783182715666855600e-01 +8.077229876914296947e-01 8.063801435632871328e-01 6.713153485176399649e-01 +7.947461515019460521e-01 8.004373108778479740e-01 6.653252445665102099e-01 +7.818234645252460924e-01 7.944593749272963468e-01 6.599830880041622772e-01 +7.690043949000203716e-01 7.884424060393956379e-01 6.551042701424648618e-01 +7.562981288404810876e-01 7.823918885846237181e-01 6.505794347324633797e-01 +7.437166688251096724e-01 7.763107155814537030e-01 6.463185559404119873e-01 +7.312864875465606707e-01 7.701962491575811143e-01 6.422364303657139839e-01 +7.189850527082707332e-01 7.640604119000086181e-01 6.382908369799579207e-01 +7.068142314422918293e-01 7.579064471112740842e-01 6.344344908612202794e-01 +6.947742510783049275e-01 7.517375363827888402e-01 6.306282821287318985e-01 +6.828537141789142728e-01 7.455586837934410349e-01 6.268596706266046370e-01 +6.710011548564486228e-01 7.393836600422335481e-01 6.231736409952126632e-01 +6.592657914925743601e-01 7.332038660876558644e-01 6.194650744353706884e-01 +6.476362335539276316e-01 7.270240901258274713e-01 6.157213868460473805e-01 +6.360362802101585666e-01 7.208613432160450030e-01 6.120373156027114625e-01 +6.245080854916185142e-01 7.147082392942302187e-01 6.083234269572357356e-01 +6.130488547076046180e-01 7.085668274101213360e-01 6.045591744160895287e-01 +6.015892322420162142e-01 7.024496994714828357e-01 6.008489625961975777e-01 +5.901987677923722364e-01 6.963445147045469463e-01 5.970628836865409239e-01 +5.787942193155654058e-01 6.902683578483006510e-01 5.932973990580240331e-01 +5.673843957655613224e-01 6.842194608428608937e-01 5.895220675517639508e-01 +5.559759005656629283e-01 6.781954870319548689e-01 5.857224142025272418e-01 +5.445452293547278222e-01 6.721991418209628533e-01 5.819309981473995697e-01 +5.330284999192810291e-01 6.662471887845208274e-01 5.781518614893066399e-01 +5.216118831320554206e-01 6.602860177867492242e-01 5.743450969986969579e-01 +5.100461930662858467e-01 6.543801579393034862e-01 5.705892298512411642e-01 +4.985462196160774240e-01 6.484680127740434230e-01 5.668522387113605898e-01 +4.869212854485653330e-01 6.426004706277155254e-01 5.631503671835994540e-01 +4.753175948425168440e-01 6.367342039857054603e-01 5.594833076156262575e-01 +4.635884121260610002e-01 6.309044987522948178e-01 5.558810414566710545e-01 +4.517937357110975438e-01 6.250933232803836948e-01 5.523287210439038475e-01 +4.399781445380013811e-01 6.192864046496112662e-01 5.488272822016192487e-01 +4.280176465668665831e-01 6.135117804844451017e-01 5.453889520686707737e-01 +4.160613175390713292e-01 6.077287406576958873e-01 5.420126140975655149e-01 +4.039857150007630238e-01 6.019638930796089582e-01 5.387130326489297794e-01 +3.917475183228279478e-01 5.962226288699170595e-01 5.354998204993742794e-01 +3.795396260545044753e-01 5.904576990603345177e-01 5.323562706006824685e-01 +3.671980489650730761e-01 5.847026249394290387e-01 5.292995421656493393e-01 +3.547169039649492039e-01 5.789540227003182604e-01 5.263324098770649773e-01 +3.421991518101316077e-01 5.731858973997910889e-01 5.234530196411122382e-01 +3.296321613618491964e-01 5.673978264587494769e-01 5.206643628468334839e-01 +3.169539434232791497e-01 5.615982678332219757e-01 5.179739584214747561e-01 +3.041848831902358996e-01 5.557790841809171489e-01 5.153814622924314248e-01 +2.913580245785495904e-01 5.499302942311713460e-01 5.128866030358065764e-01 +2.786210115475045712e-01 5.440237902965463501e-01 5.104770287408624263e-01 +2.658767813620477316e-01 5.380746002424073859e-01 5.081635613728290313e-01 +2.531728049963842264e-01 5.320730905152252221e-01 5.059419345415738789e-01 +2.405801746352321802e-01 5.260084224989675095e-01 5.037958873725133513e-01 +2.281731742156575815e-01 5.198710287686101328e-01 5.017115180274238639e-01 +2.160357564123031038e-01 5.136521477693153370e-01 4.996732344467323395e-01 +2.042553268175122949e-01 5.073441845910725556e-01 4.976709295334373340e-01 +1.929455786157068808e-01 5.009402502860922368e-01 4.956743078037426087e-01 +1.822159137211172564e-01 4.944360671084672698e-01 4.936576912144489682e-01 +1.721720047662203268e-01 4.878296612331804449e-01 4.915973661753361701e-01 +1.629121950514905992e-01 4.811217814834132800e-01 4.894661845895681984e-01 +1.545167219577190942e-01 4.743156260955230796e-01 4.872413962325574111e-01 +1.470425142510033700e-01 4.674166983864977420e-01 4.849028953714263346e-01 +1.405113128544070999e-01 4.604338355815827399e-01 4.824271757570474661e-01 +1.349217530726786463e-01 4.533748092665628726e-01 4.798101955391982920e-01 +1.302797342394179658e-01 4.462455116423036938e-01 4.770426757084247904e-01 +1.265939811024292538e-01 4.390496902560914738e-01 4.741166274104288703e-01 +1.236843852121248255e-01 4.318074599363258548e-01 4.710274926158040665e-01 +1.214646610875383670e-01 4.245259430194671113e-01 4.677892044131184979e-01 +1.198403481002758841e-01 4.172122902240388842e-01 4.644123639304529871e-01 +1.184609210323855077e-01 4.098925950294425857e-01 4.609615952184937249e-01 +1.168754986210283897e-01 4.026022451761210874e-01 4.575160089880971337e-01 +1.151007877850314109e-01 3.953385852310392079e-01 4.540805121238136732e-01 +1.131413084296974680e-01 3.881005310447923073e-01 4.506558243985225309e-01 +1.110221391582094097e-01 3.808834919340156611e-01 4.472532258515609649e-01 +1.087511055351796929e-01 3.736854209969548424e-01 4.438760147968137115e-01 +1.063262941094024749e-01 3.665057054845847206e-01 4.405230161394063093e-01 +1.037537167610996236e-01 3.593424059991345287e-01 4.371963158215718681e-01 +1.010396012430455071e-01 3.521934333571229425e-01 4.338979957908608021e-01 +9.820785452879465804e-02 3.450535925989220432e-01 4.306390199340546787e-01 +9.524886735285809092e-02 3.379231538671472745e-01 4.274136452659025309e-01 +9.216708027427711336e-02 3.307999936437661659e-01 4.242225680363120865e-01 +8.898719812499519821e-02 3.236783223748895821e-01 4.210773055644454477e-01 +8.570498821294705860e-02 3.165572544150943024e-01 4.179737087144154706e-01 +8.232861945095013012e-02 3.094336626170069993e-01 4.149138402418848237e-01 +7.888091832597513009e-02 3.023016385852106969e-01 4.119079586942359095e-01 +7.535426196281005962e-02 2.951606915265346798e-01 4.089483103763945637e-01 +7.178216232425585486e-02 2.880027122692483954e-01 4.060506695454764170e-01 +6.815855459758968227e-02 2.808269749834076956e-01 4.032054679392391150e-01 +6.448898508226078019e-02 2.736310489100942100e-01 4.004060238485768752e-01 +6.082018328964860360e-02 2.664035583373736138e-01 3.976774815474886093e-01 +5.716124112921574379e-02 2.591406963233486849e-01 3.950170320465338780e-01 +5.351466965820251415e-02 2.518414268825251989e-01 3.924068662312853450e-01 +4.993186694626653571e-02 2.444935102031051688e-01 3.898697442701583027e-01 +4.643877317377426844e-02 2.370912873691644052e-01 3.873999194228605614e-01 +4.308214165698193848e-02 2.296247589871482364e-01 3.850043813960570827e-01 +3.988193032745831340e-02 2.220895846072232227e-01 3.826648500695101207e-01 +3.696588053809187618e-02 2.144711117753294594e-01 3.803951582141073540e-01 +3.503963119120004355e-02 2.067382236169432175e-01 3.779948138188178319e-01 +3.478421889488789165e-02 1.988679039642712310e-01 3.751470684509792819e-01 +3.605446405610013977e-02 1.908764917041337605e-01 3.717394054831296146e-01 +3.860378491452313293e-02 1.827911805345073526e-01 3.676697392369102646e-01 +4.204158194669544574e-02 1.746484839257387567e-01 3.628639802125444569e-01 +4.580769332477269834e-02 1.664868235304900745e-01 3.572935027519454909e-01 +4.953046775643197425e-02 1.583391239953714225e-01 3.509783278645146609e-01 +5.294794616753940170e-02 1.502287847236943308e-01 3.439780107867805858e-01 +5.589746873554810730e-02 1.421689980048106428e-01 3.363784527482869824e-01 +5.832364005801801005e-02 1.341588757852459068e-01 3.282715328574966618e-01 +6.018929987904993867e-02 1.261942031427702726e-01 3.197538950865533303e-01 +6.152266558088163168e-02 1.182670459661474271e-01 3.108793933905304452e-01 diff --git a/cmocean/rgb/tarn.jscm b/cmocean/rgb/tarn.jscm new file mode 100644 index 0000000..79e7582 --- /dev/null +++ b/cmocean/rgb/tarn.jscm @@ -0,0 +1,50 @@ +{ + "content-type": "application/vnd.matplotlib.colormap-v1+json", + "name": "rain_anomaly7c", + "license": "http://creativecommons.org/publicdomain/zero/1.0/", + "usage-hints": [ + "red-green-colorblind-safe", + "greyscale-safe", + "diverging" + ], + "colorspace": "sRGB", + "domain": "continuous", + "colors": "101e4f0f20520f22540e24560e26580d28590c2a5b0b2d5d0a2f5e09315f0933600935600937610a39620b3b620c3c630d3e630e40640f4265104465104666114867124968134b68144d69154f6a16516b17536b18546c18566d19586e1a5a6f1a5c6f1b5d701c5f711c61721d63731d65741e67751e69761f6a761f6c77206e7820707921727a22747a24757b25777c27797c2a7b7d2c7c7d2e7e7e31807e34817f37837f3a85803d8680418881448982478b824a8c834e8e83518f845491855792855a94865e9587619788649889679a896a9b8a6d9c8b709e8c739f8d76a18e79a28f7ca4907fa59182a79285a89288aa938bab948ead9591ae9694b09797b29899b3999cb59a9fb69ba2b89ca5b99da8bb9eabbd9faebea0b1c0a1b4c1a2b7c3a3bac4a4bec6a5c1c8a6c4c9a7c7cba8cbccaaceceabd1cfadd4d1afd7d2b2dad4b4ddd6b8dfd7bbe1d9bfe3dbc2e5ddc6e7dfcae9e2cdebe4d1ede6d5efe8d8f0eadcf2ece0f4eee3f6f0e7f8f2eaf9f4edfbf5f0fbf6f3fcf7f5fcf7f6fcf7f6fcf6f4fcf5f2fbf3effaf1ecf9efe9f8ece5f7eae2f6e8dff4e5dbf3e3d8f2e0d4f1ded1f0dbcdefd9c9edd7c6ecd4c2ebd2bfead0bbe9cdb8e8cbb4e7c8b1e6c6ade5c4aae4c1a6e3bfa3e2bd9fe1ba9ce0b898dfb695deb391ddb18edcaf8adbad87dbaa83daa880d9a67cd8a379d7a175d69f72d59c6fd49a6bd39868d29664d29361d1915dd08f5acf8c57ce8a53cd884fcc864ccb8448c98244c68141c4803ec17f3cbe7e3abb7d39b87c37b57b36b27a35af7933ac7832a97731a67630a3752fa0742e9e732d9b722c98712b95702a926f298f6e288c6d27896c27866b26846a258169247e68237b672278662176642173632070621f6d611e6b601d685f1c655e1b625d1a605c1a5d5b195a59185758175557165256154f55144d54134a5312475111445010424f0f3f4e0e3c4d0d394b0c364a0c34490c32470d30460e2f440e2e420f2c410f2b3f0f2a3d10283c10273a102638102537102335102233102131102030101f2e101d2c0f1c2a0f1b290f19270e18250e17230e", + "extensions": { + "https://matplotlib.org/viscm": { + "min_Jp": 100, + "max_Jp": 15, + "xp": [ + 3.8377443637331794, + -5.366608689579621, + -10.65801045092823, + -21.93045150111189, + -0.8055505240852199, + 0, + 7.683556865582133, + 14.487686676545664, + -9.927666855074008, + -11.608056705519317, + -7.046998540024916 + ], + "yp": [ + -15.76931041623525, + -22.275968024581694, + -16.95263733988108, + -3.7916796696833543, + 13.252274527690432, + 0, + 13.222199213087592, + 22.39298287134278, + 18.293444079026344, + 17.09316561442256, + 8.451160669275282 + ], + "fixed": 5, + "filter_k": 50.5824662003114, + "cmtype": "diverging", + "uniform_colorspace": "CAM02-UCS", + "spline_method": "CatmulClark" + } + } +} \ No newline at end of file diff --git a/cmocean/rgb/topo-land.jscm b/cmocean/rgb/topo-land.jscm new file mode 100644 index 0000000..33702a7 --- /dev/null +++ b/cmocean/rgb/topo-land.jscm @@ -0,0 +1,38 @@ +{ + "content-type": "application/vnd.matplotlib.colormap-v1+json", + "name": "topo_land4", + "license": "http://creativecommons.org/publicdomain/zero/1.0/", + "usage-hints": [ + "red-green-colorblind-safe", + "greyscale-safe", + "sequential" + ], + "colorspace": "sRGB", + "domain": "continuous", + "colors": "0d25140e26140e27150f28150f2915102a16102a16112b16112c17122d17122e17132f1813301814311814321814321915331915341916351a16361a17371a17381a17391b183a1b183a1b193b1b193c1c193d1c1a3e1c1a3f1c1b401c1b411d1b411d1c421d1c431d1d441d1d451d1d461e1e471e1e481e1f481e1f491e204a1e214b1e214c1e224d1e234e1e244e1e254f1e26501e27511e28511e2a521e2c531f2d531f2f54203055203255213356223556233657233858243958253a59263c5a263d5a273f5b28405b29415c2a435d2b445d2b455e2c475f2d485f2e49602f4b602f4c61304d62314e62315063325163335264335465345565345666355867365967365a68375c68375d69375e6a38606a38616b39626c39646c3a656d3a666d3a686e3b696f3b6a6f3b6b703c6d703c6e713c6f723d71723d72733d73743d75743d76753e77753e79763e7a773e7b773e7d783f7e793f7f793f817a3f827a3f837b3f857c3f867c3f877d40897e408a7e408c7f408d7f408e80409081409181409282409483409583409684409885409985409b86409c86409d87409f8840a08840a18940a38a40a48a3fa68b3fa78c3fa98c3faa8d3fab8d3fad8e3fae8f3fb08f3fb1903fb3913fb4913fb6923fb7923eb9933eba943ebc943ebd953fbf953fc0963fc19741c29843c39945c39a47c49b48c59c4ac59d4cc69e4ec69f50c7a052c7a153c8a255c8a357c9a459caa55acaa65ccba75ecba860cca961ccaa63cdab65cdac67cead68ceaf6acfb06ccfb16ed0b26fd0b371d1b473d2b575d2b676d3b778d3b87ad4b97cd4bb7dd5bc7fd5bd81d6be83d6bf84d7c086d7c188d8c289d8c38bd9c58ddac68fdac790dbc892dbc994dcca96dccb97ddcc99ddce9bdecf9ddfd09fdfd1a0e0d2a2e0d3a4e1d4a6e2d5a7e2d7a9e3d8abe3d9ade4daaee5dbb0e5dcb2e6deb4e6dfb6e7e0b7e8e1b9e8e2bbe9e3bdeae4beeae6c0ebe7c2ece8c4ece9c6edeac7eeebc9eeedcbefeecdf0efcff0f0d0f1f1d2f2f3d4f2f4d6f3f5d8f4f6d9f5f7dbf5f9ddf6fadff7fbe1f8fce2f9fde4f9ffe6", + "extensions": { + "https://matplotlib.org/viscm": { + "min_Jp": 15, + "max_Jp": 99, + "xp": [ + -9.871026556872351, + -16.99470456662631, + -5.761212320475849, + 6.568230388713701, + -3.843299010157466 + ], + "yp": [ + 5.855115348786228, + 15.4446819003781, + 13.252780974299952, + 26.952161762288327, + 6.403090580305758 + ], + "fixed": -1, + "filter_k": 10, + "cmtype": "linear", + "uniform_colorspace": "CAM02-UCS", + "spline_method": "CatmulClark" + } + } +} \ No newline at end of file diff --git a/cmocean/rgb/topo-rgb.txt b/cmocean/rgb/topo-rgb.txt new file mode 100644 index 0000000..6bc43b9 --- /dev/null +++ b/cmocean/rgb/topo-rgb.txt @@ -0,0 +1,256 @@ +1.561019746507273376e-01 1.026082525875711138e-01 1.727215696232307918e-01 +1.614878059346168959e-01 1.086331782717616379e-01 1.834416540200605461e-01 +1.668117590877864764e-01 1.145994139402238821e-01 1.942594655847655616e-01 +1.720703275074147443e-01 1.205129174047056828e-01 2.051860710532931176e-01 +1.772595702951434704e-01 1.263792859047284667e-01 2.162309361702130506e-01 +1.823751828761793481e-01 1.322038111876145949e-01 2.274020989868827392e-01 +1.874125186315797886e-01 1.379915476831030108e-01 2.387062880680187460e-01 +1.923665760685599468e-01 1.437473901381048913e-01 2.501489823140411461e-01 +1.972319620276792862e-01 1.494761585027865047e-01 2.617344119314569673e-01 +2.020028382233076125e-01 1.551826890051333785e-01 2.734655011163185101e-01 +2.066728560428846562e-01 1.608719311731062473e-01 2.853437530392856081e-01 +2.112350828916275125e-01 1.665490510713014960e-01 2.973690772834624574e-01 +2.156819223383368844e-01 1.722195412332822306e-01 3.095395593647118360e-01 +2.200027865362182422e-01 1.778889096627078448e-01 3.218593457818205161e-01 +2.241821302892643142e-01 1.835626593748518609e-01 3.343431537784405938e-01 +2.282155151615900546e-01 1.892493734782149939e-01 3.469585312854190362e-01 +2.320913707908846546e-01 1.949572807641995476e-01 3.596924727656225507e-01 +2.357791582066215419e-01 2.006936504843463420e-01 3.725810406048237766e-01 +2.392760085101002243e-01 2.064712127546999287e-01 3.855616338648150121e-01 +2.425474613143962510e-01 2.123011804696942062e-01 3.986531809377649171e-01 +2.455817950644241798e-01 2.181991605590304917e-01 4.117955160707330586e-01 +2.483306606950595463e-01 2.241817667402334346e-01 4.250033167249620547e-01 +2.507721436866522935e-01 2.302701237479483076e-01 4.382036814126420432e-01 +2.528659964243425984e-01 2.364882912834416206e-01 4.513446141213755536e-01 +2.545675711557803811e-01 2.428643843006248471e-01 4.643557571030281772e-01 +2.558322794870629413e-01 2.494300496133808887e-01 4.771399728195321877e-01 +2.566151212870083631e-01 2.562195453869526296e-01 4.895770754997314511e-01 +2.568729082739400482e-01 2.632680806498599591e-01 5.015251413221865073e-01 +2.566051651711689918e-01 2.706008890121900934e-01 5.127963599343589030e-01 +2.558254018044066047e-01 2.782328077909240194e-01 5.232189983935346955e-01 +2.545978636988186494e-01 2.861560770732184955e-01 5.326370186681820273e-01 +2.530378388279626023e-01 2.943355684042912035e-01 5.409499814033098541e-01 +2.512817651002536290e-01 3.027167370222472731e-01 5.481422664464320471e-01 +2.494682375867288693e-01 3.112353605277175528e-01 5.542766318947622839e-01 +2.477157002362878613e-01 3.198299095156284522e-01 5.594704462476630669e-01 +2.461121481740833894e-01 3.284495884603169102e-01 5.638648470620498676e-01 +2.447220255685461088e-01 3.370546900675063240e-01 5.676029832475817383e-01 +2.435790408918375727e-01 3.456199709880173332e-01 5.708127541670769967e-01 +2.426978313653707087e-01 3.541305556383861908e-01 5.736016010478480753e-01 +2.420946965383475313e-01 3.625739944720036134e-01 5.760653956197256953e-01 +2.417595622535183009e-01 3.709493751547713325e-01 5.782729391945388153e-01 +2.416897018162703636e-01 3.792548337300427064e-01 5.802858143751018494e-01 +2.418784445905285962e-01 3.874910027793410650e-01 5.821542521747482546e-01 +2.423091294682429564e-01 3.956627542073260506e-01 5.839131390484204598e-01 +2.429695407602900925e-01 4.037738393736669540e-01 5.855939512690606641e-01 +2.438461792188084676e-01 4.118287207942545325e-01 5.872218507211212080e-01 +2.449256139784778408e-01 4.198319765418777605e-01 5.888176525512366366e-01 +2.461926332303804310e-01 4.277888629705645096e-01 5.903967722170088139e-01 +2.476314436738927260e-01 4.357048438328084417e-01 5.919706842419948378e-01 +2.492275176071283571e-01 4.435849323073600692e-01 5.935491293785424283e-01 +2.509665668417216944e-01 4.514340415062205181e-01 5.951395103673859932e-01 +2.528346862021874641e-01 4.592569393176054171e-01 5.967472668238706923e-01 +2.548184740794410263e-01 4.670582183399953347e-01 5.983761730113198452e-01 +2.569051367797046126e-01 4.748422758923547815e-01 6.000285749995881712e-01 +2.590825816132030779e-01 4.826133005480903182e-01 6.017055804809932074e-01 +2.613396987489819967e-01 4.903751992421883643e-01 6.034074237284018372e-01 +2.636659810857353015e-01 4.981317406526836744e-01 6.051330956906521008e-01 +2.660516582874621339e-01 5.058865272594796902e-01 6.068805013837572648e-01 +2.684882380171457750e-01 5.136428405367017280e-01 6.086470522439324515e-01 +2.709683308416185876e-01 5.214037172983150281e-01 6.104294711750373192e-01 +2.734857257205313141e-01 5.291719440816851083e-01 6.122238564648385672e-01 +2.760354668808263079e-01 5.369500509042623992e-01 6.140257392505246159e-01 +2.786139324558262742e-01 5.447403043452749838e-01 6.158301364812402978e-01 +2.812189151446758406e-01 5.525446999518639490e-01 6.176316008625786225e-01 +2.838497050469647731e-01 5.603649539888247988e-01 6.194242689076802089e-01 +2.865071747347951447e-01 5.682024945496734203e-01 6.212019079466474247e-01 +2.891935293105973304e-01 5.760585509806988025e-01 6.229575870601862242e-01 +2.919132661023912667e-01 5.839338872257091584e-01 6.246846842638799080e-01 +2.946726143633343065e-01 5.918289843891730850e-01 6.263762188290394883e-01 +2.974797079780254205e-01 5.997440045832753697e-01 6.280249877540684533e-01 +3.003447193279823457e-01 6.076787658883653354e-01 6.296236627075371128e-01 +3.032799496578738041e-01 6.156327286641396501e-01 6.311648425953061414e-01 +3.062999162775806861e-01 6.236049805794583456e-01 6.326411091031564071e-01 +3.094214341373541788e-01 6.315942201545601264e-01 6.340450861601970578e-01 +3.126636885203824545e-01 6.395987386132337971e-01 6.353695045172913503e-01 +3.160482946464280851e-01 6.476163998706647718e-01 6.366072729215248582e-01 +3.195993388733257556e-01 6.556446185422359907e-01 6.377515576836865208e-01 +3.233433949344308722e-01 6.636803359579184214e-01 6.387958727683986648e-01 +3.273095072934468774e-01 6.717199943156246800e-01 6.397341828681051279e-01 +3.315291322901112725e-01 6.797595093162658308e-01 6.405610222271946874e-01 +3.360351011011302735e-01 6.877945827659479594e-01 6.412695960850323118e-01 +3.408640318201912600e-01 6.958197818437616977e-01 6.418569321473704958e-01 +3.460540467004642462e-01 7.038291754672099110e-01 6.423205839967465192e-01 +3.516446005650431528e-01 7.118162697085735902e-01 6.426589560156208414e-01 +3.576762479926827720e-01 7.197739138067411613e-01 6.428719883285997083e-01 +3.641894512092864744e-01 7.276949011320993366e-01 6.429557270674552960e-01 +3.712266123106295335e-01 7.355700686179795778e-01 6.429189618774799886e-01 +3.788278449989629926e-01 7.433902546660990929e-01 6.427683061328856029e-01 +3.870322615152646528e-01 7.511462095764531721e-01 6.425055472082883412e-01 +3.958750262046074608e-01 7.588270315806920907e-01 6.421508285001665817e-01 +4.053883482522956383e-01 7.664223146281371468e-01 6.417151578859574546e-01 +4.155968407812616339e-01 7.739210344346504344e-01 6.412227317683711902e-01 +4.265195639210723755e-01 7.813124732411278472e-01 6.406960731925235297e-01 +4.381634653667463852e-01 7.885863788123392837e-01 6.401694292235835526e-01 +4.505287643111087204e-01 7.957333261733031682e-01 6.396742566585853496e-01 +4.635986539031755060e-01 8.027456073395251579e-01 6.392548734619343254e-01 +4.773469739538908629e-01 8.096172922533247940e-01 6.389538165444101914e-01 +4.917330703220189059e-01 8.163450533427777378e-01 6.388184799685107107e-01 +5.067050118087177424e-01 8.229283397233977393e-01 6.388963162980869637e-01 +5.221997330825246530e-01 8.293697946738645133e-01 6.392346216632595057e-01 +5.381481232862911357e-01 8.356748924828519831e-01 6.398763669277579558e-01 +5.544783665092802849e-01 8.418515860497588488e-01 6.408587965640016870e-01 +5.711115213696185133e-01 8.479112775740021979e-01 6.422171169895777298e-01 +5.879840953182007279e-01 8.538646600753627691e-01 6.439710905713145195e-01 +6.050194699551968425e-01 8.597270135144634562e-01 6.461439080647282118e-01 +6.221681809999368706e-01 8.655099786991408140e-01 6.487403091120448329e-01 +6.393757001353049807e-01 8.712277338509245572e-01 6.517658303256151919e-01 +6.565929334411800822e-01 8.768947704523611941e-01 6.552210497573525139e-01 +6.737933070789577927e-01 8.825213731875580780e-01 6.590961736178440056e-01 +6.909478082204841831e-01 8.881191135591984809e-01 6.633823202371271766e-01 +7.080340865696405084e-01 8.936985513356989763e-01 6.680678941563225059e-01 +7.250358375800118882e-01 8.992691342626382145e-01 6.731393536848668813e-01 +7.419421046029871514e-01 9.048391559449654453e-01 6.785819005039074314e-01 +7.587465580267132026e-01 9.104157595099175992e-01 6.843800748081978469e-01 +7.754467945117471395e-01 9.160049747102424478e-01 6.905182510191696377e-01 +7.920436855303579771e-01 9.216117772405966191e-01 6.969810377273069069e-01 +8.085407925860420564e-01 9.272401607530683654e-01 7.037535913222745521e-01 +8.249438571064254822e-01 9.328932140048489252e-01 7.108218561594963347e-01 +8.412422934868647451e-01 9.385792958890862847e-01 7.181734629573161000e-01 +8.574559441871676402e-01 9.442965454208677167e-01 7.257948454644865821e-01 +8.735986658557798323e-01 9.500445573198598170e-01 7.336747582572585857e-01 +8.896512126622908578e-01 9.558344072358454513e-01 7.418023698547455691e-01 +9.056514559384564178e-01 9.616567079910524063e-01 7.501688017241657791e-01 +9.215850348376466439e-01 9.675205198521025229e-01 7.587646801057830181e-01 +9.374799177499437697e-01 9.734191074102575003e-01 7.675843461643131471e-01 +9.533233708513803029e-01 9.793607550577946297e-01 7.766197776697654209e-01 +9.691488355955474310e-01 9.853357520972024775e-01 7.858697059005903540e-01 +9.849374457410008388e-01 9.913545172197536504e-01 7.953271573982337861e-01 +5.237510688652501772e-02 1.452546228317073418e-01 7.751950190923809214e-02 +5.622628551680566161e-02 1.523457500722602831e-01 8.040279400454641845e-02 +6.007072166263575236e-02 1.593963705834963718e-01 8.324827330002768089e-02 +6.385205670255669763e-02 1.664232541404700172e-01 8.599651952193751447e-02 +6.756460338718012215e-02 1.734310951493893138e-01 8.864073081078854832e-02 +7.121409992638502717e-02 1.804216402085259963e-01 9.118655316732873772e-02 +7.479859509186639888e-02 1.873981595163995706e-01 9.363114185870033412e-02 +7.832196854697648369e-02 1.943623428359516903e-01 9.597819921125996800e-02 +8.178249510428708957e-02 2.013169715395964343e-01 9.822505767280115263e-02 +8.518219102467458614e-02 2.082637805063026204e-01 1.003733079455831900e-01 +8.852454157738801066e-02 2.152040105951080751e-01 1.024263253707545229e-01 +9.181013978863614144e-02 2.221394247672267563e-01 1.043841327744766678e-01 +9.503809838243432173e-02 2.290719902760253168e-01 1.062449430282469132e-01 +9.821010670676499910e-02 2.360029705984670323e-01 1.080100113958255836e-01 +1.013286574784400540e-01 2.429333482333665417e-01 1.096815914631605327e-01 +1.043934471701543076e-01 2.498646410896294690e-01 1.112585290437959340e-01 +1.074478296880792549e-01 2.567911108934768372e-01 1.127437202480449374e-01 +1.106260709129789077e-01 2.636946096457899458e-01 1.140997527427590474e-01 +1.139531706355643714e-01 2.705743606077580798e-01 1.152896296272559462e-01 +1.174768136636618332e-01 2.774250521408649361e-01 1.162908535730605153e-01 +1.213000971217181034e-01 2.842316842811704602e-01 1.170941428738193346e-01 +1.255340801183247312e-01 2.909784812573655843e-01 1.176678790007481823e-01 +1.303876420091158728e-01 2.976323416853482451e-01 1.179910028329904936e-01 +1.361775080109454139e-01 3.041399107394244794e-01 1.180416347026809198e-01 +1.434815209152097981e-01 3.103930959766884601e-01 1.179050440739785321e-01 +1.530522840464018097e-01 3.162194219215394564e-01 1.180658427800789778e-01 +1.647443020935283886e-01 3.215541086259602332e-01 1.195833209716834211e-01 +1.771224001134716619e-01 3.266051714744359624e-01 1.228383029974784990e-01 +1.893186680349762951e-01 3.315543486926041949e-01 1.273271390832197980e-01 +2.011470216295637714e-01 3.364693524047602802e-01 1.325809211223410999e-01 +2.126201126913634942e-01 3.413717760208538898e-01 1.383257062913032798e-01 +2.237814929443558420e-01 3.462703085838705896e-01 1.444001987716135027e-01 +2.346826504126838242e-01 3.511667839317458850e-01 1.507119862068962424e-01 +2.453653984352425765e-01 3.560619397292786315e-01 1.572020472843533856e-01 +2.558610883411705506e-01 3.609568875025493395e-01 1.638280010474283122e-01 +2.662540618029768935e-01 3.658464720551902194e-01 1.703646574946249270e-01 +2.766375890957337713e-01 3.707202928157689592e-01 1.766042606681927363e-01 +2.870120792807265286e-01 3.755815421723879277e-01 1.825448147300349488e-01 +2.973798701367175723e-01 3.804331662296118188e-01 1.881754975600970214e-01 +3.077385714853347887e-01 3.852782482569529487e-01 1.935061166107706343e-01 +3.180883154404229307e-01 3.901193934855016199e-01 1.985393196990216658e-01 +3.284295845809043213e-01 3.949589033692603168e-01 2.032788009798182638e-01 +3.387636524478269684e-01 3.997986013442899611e-01 2.077297610727937283e-01 +3.490920713533000597e-01 4.046399832445768951e-01 2.118988339848660862e-01 +3.594164000962936090e-01 4.094843090462684243e-01 2.157940430809284771e-01 +3.697392907451491073e-01 4.143322752680254073e-01 2.194241817700406383e-01 +3.800629535453087238e-01 4.191845097543299148e-01 2.227990620346612660e-01 +3.903897648146955057e-01 4.240414062699767728e-01 2.259290789901750585e-01 +4.007222760346346169e-01 4.289031445516293117e-01 2.288249032905495528e-01 +4.110629393231473583e-01 4.337698031247444463e-01 2.314973656174672545e-01 +4.214141346107081465e-01 4.386413758769234783e-01 2.339572260458537833e-01 +4.317776944235289238e-01 4.435179532313937023e-01 2.362153631413001498e-01 +4.421554582272910761e-01 4.483995629988481446e-01 2.382822640902987343e-01 +4.525491728091692312e-01 4.532862202325000367e-01 2.401679621083726013e-01 +4.629617793452492358e-01 4.581777295849584486e-01 2.418766613523773423e-01 +4.733964081044912953e-01 4.630738873787103027e-01 2.434097398165305792e-01 +4.838512407114513025e-01 4.679753825260214994e-01 2.447870115640884969e-01 +4.943280333549550654e-01 4.728822194350857377e-01 2.460147775573224282e-01 +5.048329973069679566e-01 4.777936355059679285e-01 2.470786486003125892e-01 +5.153613297132805249e-01 4.827109910092828859e-01 2.480074378391989298e-01 +5.259177888805488532e-01 4.876337443949864681e-01 2.487920646168808037e-01 +5.365028531047130178e-01 4.925622747803105050e-01 2.494384427855986242e-01 +5.471168004411860464e-01 4.974969337464568153e-01 2.499544447192391661e-01 +5.577636102245655536e-01 5.024372790562059432e-01 2.503320304175396527e-01 +5.684402705004985012e-01 5.073846875194365502e-01 2.505862169320990929e-01 +5.791517884291441653e-01 5.123382474891868821e-01 2.507078127142677859e-01 +5.898977118592134694e-01 5.172986884163369714e-01 2.507019666506383193e-01 +6.006780609928230596e-01 5.222664305265023454e-01 2.505758843768319810e-01 +6.114977839232860202e-01 5.272408795639659251e-01 2.503116806147138718e-01 +6.223533151135658414e-01 5.322233326069301107e-01 2.499311738427514862e-01 +6.332678499493179514e-01 5.372050254585409856e-01 2.494034423308610915e-01 +6.442492302385145475e-01 5.421770814367210534e-01 2.488390322915944863e-01 +6.553235853574364000e-01 5.471283166651099705e-01 2.482154543042252026e-01 +6.664663550324848584e-01 5.520678623990600276e-01 2.475959486163559209e-01 +6.777036161655425328e-01 5.569846941304811283e-01 2.469507035732461664e-01 +6.890381603900364027e-01 5.618763691265282745e-01 2.463040749474359470e-01 +7.004711944468632323e-01 5.667403668940831363e-01 2.456991151603213352e-01 +7.120126265469914895e-01 5.715693590145963787e-01 2.451873584080898616e-01 +7.236929482815777082e-01 5.763444689764196660e-01 2.448364505953754544e-01 +7.355168651190714391e-01 5.810504769862679941e-01 2.449163925191181757e-01 +7.475258033710173722e-01 5.856296804733571726e-01 2.462013043800762579e-01 +7.577499494457186069e-01 5.908503548553694085e-01 2.547905571379186496e-01 +7.635824979182088690e-01 5.981540408918001317e-01 2.695060335496625714e-01 +7.685008057442868079e-01 6.059656669084559910e-01 2.841339736308181596e-01 +7.731069113227515555e-01 6.139683821427790456e-01 2.985534874705023101e-01 +7.775652489236080100e-01 6.220751351043045663e-01 3.127742014086093980e-01 +7.819223609772602002e-01 6.302590951035305089e-01 3.268597741416817137e-01 +7.862053950616281206e-01 6.385051507786967395e-01 3.408479839175493908e-01 +7.904426037822046558e-01 6.467997885569605199e-01 3.547436291978552925e-01 +7.946574580110756791e-01 6.551326370117361853e-01 3.685463547975237342e-01 +7.988337796012735526e-01 6.635096250178373900e-01 3.823162323281250607e-01 +8.030088001380106810e-01 6.719161948372565085e-01 3.960118210517307724e-01 +8.071531032877933276e-01 6.803638144055433878e-01 4.097046504341926854e-01 +8.113041001849377043e-01 6.888386707654255980e-01 4.233460558902438220e-01 +8.154602754828877975e-01 6.973419981167042758e-01 4.369537331203900976e-01 +8.196058627154122478e-01 7.058802025749554288e-01 4.505666902424197429e-01 +8.237568818874844156e-01 7.144480574336203871e-01 4.641691373089507633e-01 +8.279197418246522222e-01 7.230440823922363869e-01 4.777602014010458586e-01 +8.320913582455962132e-01 7.316701160638459100e-01 4.913552497157864241e-01 +8.362534254444016213e-01 7.403317836360435722e-01 5.050123599879642322e-01 +8.404445466425872757e-01 7.490163102116410565e-01 5.186797759271363217e-01 +8.446648066780128028e-01 7.577248034134459465e-01 5.323633003798176055e-01 +8.489177724746317377e-01 7.664572638824626027e-01 5.460621193928290040e-01 +8.532123511454875464e-01 7.752120992980529035e-01 5.597655879096986586e-01 +8.575441658298394998e-01 7.839918355417494489e-01 5.734875036821195371e-01 +8.619146064360614368e-01 7.927971784487287676e-01 5.872309291049341295e-01 +8.663250853209770730e-01 8.016288174204664330e-01 6.009988751772729065e-01 +8.707820725499390013e-01 8.104859794311163323e-01 6.147852119944903215e-01 +8.752928841127598503e-01 8.193677275097041024e-01 6.285824125979521115e-01 +8.798495959466368088e-01 8.282774528639023082e-01 6.424105990843714808e-01 +8.844600743726268588e-01 8.372140407050960853e-01 6.562614074750376947e-01 +8.891318088448872947e-01 8.461765685160849149e-01 6.701273264224787418e-01 +8.938558100770686021e-01 8.551685709847908212e-01 6.840307207014526547e-01 +8.986544949798678239e-01 8.641851727809914951e-01 6.979374582474833222e-01 +9.035103927619371200e-01 8.732320822602240851e-01 7.118855904188222672e-01 +9.084448340107732500e-01 8.823048446731206473e-01 7.258432784575933328e-01 +9.134526188903524524e-01 8.914059055188421343e-01 7.398268438202468822e-01 +9.185353828258727704e-01 9.005358905803305669e-01 7.538405390559674846e-01 +9.237018976170942031e-01 9.096936780016002810e-01 7.678758238575987827e-01 +9.289597403884261029e-01 9.188785152907725795e-01 7.819264008239902308e-01 +9.343121189309133712e-01 9.280907276838803455e-01 7.959940980655445530e-01 +9.397648981125013012e-01 9.373300331729016444e-01 8.100759042872343052e-01 +9.453185269797627077e-01 9.465973949550759992e-01 8.241789901926560580e-01 +9.509801771850346919e-01 9.558922732509941289e-01 8.382978631896051969e-01 +9.567560362262098606e-01 9.652144306850017896e-01 8.524284880105463813e-01 +9.626518136622860267e-01 9.745638255706342568e-01 8.665671328953633568e-01 +9.686647318914142213e-01 9.839422330504176140e-01 8.807260550903986962e-01 +9.747892173640951841e-01 9.933519398287798952e-01 8.949228432580742520e-01 diff --git a/cmocean/tools.py b/cmocean/tools.py index 5fe39f1..5a820de 100644 --- a/cmocean/tools.py +++ b/cmocean/tools.py @@ -107,3 +107,164 @@ def lighten(cmapin, alpha): # set the alpha value while retaining the number of rows in original cmap return cmap(cmapin(np.linspace(0,1,cmapin.N), alpha)) + + +def crop(cmapin, vmin, vmax, pivot, N=None, dmax=None): + '''Crop end or ends of a diverging colormap by vmin/vmax values. + + :param cmap: A colormap object, like cmocean.cm.matter. + :param vmin/vmax: vmin/vmax for use in plot with colormap. + :param pivot: center point to be used in plot with diverging colormap. + :param N=None: User can specify the number of rows for the outgoing colormap. + If unspecified, N from incoming colormap will be used and values will + be interpolated as needed to fill in rows. + :param dmax=None: dmax is the highest number to be included in a plot with + the colormap; values higher in magnitude than dmax are removed from both + ends of colormap. It should be less than abs(vmin) and abs(vmax), which + should be equal for this parameter to be used. + + Outputs resultant colormap object. + + This function can be used for sequential and other non-diverging colormaps + but it is easier to use that way through crop_by_percent(). + This should be useful for plotting bathymetry and topography data with the + topo colormap when max bathymetry value is different from max topography. + + Example usage: + # example for crop on min end of diverging colormap + vmin = -2; vmax = 5; pivot = 0 + newcmap = crop(cmocean.cm.curl, vmin, vmax, pivot) + A = np.random.randint(vmin, vmax, (5,5)) + plt.pcolormesh(A, vmin=vmin, vmax=vmax, cmap=newcmap) + plt.colorbar() + + # example for crop on max end of diverging colormap + vmin = -10; vmax = 8; pivot = 0 + newcmap = crop(cmocean.cm.delta, vmin, vmax, pivot) + A = np.random.randint(vmin, vmax, (5,5)) + plt.pcolormesh(A, vmin=vmin, vmax=vmax, cmap=newcmap) + plt.colorbar() + + ''' + + assert pivot >= vmin and pivot <= vmax + + # dmax used if and only if ends are equal + if vmax-pivot == pivot-vmin: + assert dmax is not None + + # allow user to input N, but otherwise use N for incoming colormap + if N is None: + N = cmapin.N + else: + N = N + + # ratio of the colormap to remove + below = pivot - vmin # below pivot + above = vmax - pivot # above pivot + + ranges = (above, below) + half_range = max(ranges) + full_range = half_range*2 + reduced_range = min(ranges) + range_to_keep = half_range + reduced_range + + ratio = (full_range-range_to_keep)/full_range + + + if below < above: # reducing colormap on side below pivot + # start colormap partway through + shortcmap = cmapin(np.linspace(0,1,N))[int(np.ceil(N*ratio)):] + + elif above < below: # reducing colormap on side above pivot + # end colormap early + shortcmap = cmapin(np.linspace(0,1,N))[:-int(np.ceil(N*ratio))] + + elif (below == above) and (dmax is not None): # equal + ratio = dmax/full_range + shortcmap = cmapin(np.linspace(0,1,N))[int(np.ceil(N*ratio)):-int(np.ceil(N*ratio))] + + # interpolate to original number of rows in colormap + newrgb = np.zeros((N, 4)) + shnum = shortcmap.shape[0] + for i in range(4): # loop through each column of cmap + newrgb[:,i] = np.interp(np.linspace(0,shnum,N), np.arange(0,shnum), shortcmap[:,i]) + + newcmap = cmap(newrgb) + + return newcmap + + +def crop_by_percent(cmap, per, which='both', N=None): + '''Crop end or ends of a colormap by per percent. + + :param cmap: A colormap object, like cmocean.cm.matter. + :param per: Percent of colormap to remove. If which=='both', take this + percent off both ends of colormap. If which=='min' or which=='max', + take percent only off the specified end of colormap. + :param which='both': which end or ends of colormap to cut off. which='both' + removes from both ends, which='min' from bottom end, and which='max' + from top end. + :param N=None: User can specify the number of rows for the outgoing colormap. + If unspecified, N from incoming colormap will be used and values will + be interpolated as needed to fill in rows. + + Outputs resultant colormap object. + + This is a wrapper around crop() to make it easier to use for cropping + based on percent. + + Examples: + # example with oxy map: cut off yellow part which is top 20% + # compare with full colormap + vmin = 0; vmax = 10; pivot = 5 + A = np.random.randint(vmin, vmax, (5,5)) + fig, axes = plt.subplots(1, 2) + mappable = axes[0].pcolormesh(A, vmin=vmin, vmax=vmax, cmap=cmocean.cm.oxy) + fig.colorbar(mappable, ax=axes[0]) + vmin = 0; vmax = 8; pivot = 5 + newcmap = crop_by_percent(cmocean.cm.oxy, 20, which='max', N=None) + plt.figure() + plt.pcolormesh(A, vmin=vmin, vmax=vmax, cmap=newcmap) + plt.colorbar() + + # example with oxy map: cut off red part which is bottom 20% + # compare with full colormap + vmin = 0; vmax = 10; pivot = 5 + A = np.random.randint(vmin, vmax, (5,5)) + fig, axes = plt.subplots(1, 2) + mappable = axes[0].pcolormesh(A, vmin=vmin, vmax=vmax, cmap=cmocean.cm.oxy) + fig.colorbar(mappable, ax=axes[0]) + vmin = 2; vmax = 10; pivot = 5 + A = np.random.randint(vmin, vmax, (5,5)) + newcmap = crop_by_percent(cmocean.cm.oxy, 20, which='min', N=None) + plt.figure() + plt.pcolormesh(A, vmin=vmin, vmax=vmax, cmap=newcmap) + plt.colorbar() + + # crop both dark ends off colormap to reduce range + newcmap = crop_by_percent(cmocean.cm.balance, 10, which='both', N=None) + plt.figure() + A = np.random.randint(-5, 5, (5,5)) + plt.pcolormesh(A, vmin=vmin, vmax=vmax, cmap=newcmap) + plt.colorbar() + + ''' + + if which == 'both': # take percent off both ends of cmap + vmin = -100; vmax = 100; pivot = 0 + dmax = per + + elif which == 'min': # take percent off bottom of cmap + vmax = 10; pivot = 5 + vmin = (0 + per/100)*2*pivot + dmax = None + + elif which == 'max': # take percent off top of cmap + vmin = 0; pivot = 5 + vmax = (1 - per/100)*2*pivot + dmax = None + + newcmap = crop(cmap, vmin, vmax, pivot, dmax=dmax, N=N) + + return newcmap diff --git a/docs/source/index.rst b/docs/source/index.rst index eb18d0a..bf2e404 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -9,6 +9,9 @@ Beautiful colormaps for oceanography: `cmocean `_ colormaps, but have now been adjusted using the `viscm tool `_ to be `perceptually uniform `_. +.. note:: This is a new version of `cmocean` with four new colormaps! + + .. note:: We have a paper with guidelines to colormap selection for your application and a description of the `cmocean` colormaps: Thyng, K. M., Greene, C. A., Hetland, R. D., Zimmerle, H. M., & DiMarco, S. F. (2016). True colors of oceanography. Oceanography, 29(3), 10. @@ -47,6 +50,191 @@ Here are some properties from the *haline* colormap. We can see that the colorma All of the evaluations of the colormaps using the viscm tool are shown in the page :ref:`colormaps_viscm`. + +Installation +------------ + +To install: +``pip install cmocean`` + +To install with Anaconda: +``conda install -c conda-forge cmocean`` + +If you want to be able to use the `plots` submodule, you can instead install with: + +``pip install "cmocean[plots]"`` + +which will also install ``viscm`` and ``colorspacious``. + + +Capabilities +------------ + +The colormaps are all available in ``cmocean.cm``. They can be accessed, and simply plotted, as follows: + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + fig = plt.figure(figsize=(8, 3)) + ax = fig.add_subplot(1, 2, 1) + cmocean.plots.test(cmocean.cm.thermal, ax=ax) + ax = fig.add_subplot(1, 2, 2) + cmocean.plots.quick_plot(cmocean.cm.algae, ax=ax) + +All available colormap names can be accessed with ``cmocean.cm.cmapnames``: + +.. ipython:: python + + import cmocean + + cmocean.cm.cmapnames + + +The colormap instances can be accessed with: + +.. ipython:: python + + import cmocean + + cmaps = cmocean.cm.cmap_d; + +Print all of the available colormaps to text files with 256 rgb entries with: + +``cmaps = cmocean.cm.cmap_d`` + +``cmocean.tools.print_colormaps(cmaps)`` + +Output a dictionary to define a colormap with: + +.. ipython:: python + + import cmocean + + cmdict = cmocean.tools.get_dict(cmocean.cm.matter, N=9) + print(cmdict) + +Make a colormap instance with ``cmap = cmocean.tools.cmap(rgbin, N=10)`` given the rgb input array. + +Reversed versions of all colormaps are available by appending "_r" to the colormap name, just as in matplotlib: + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + fig = plt.figure(figsize=(8, 3)) + ax = fig.add_subplot(1, 2, 1) + cmocean.plots.test(cmocean.cm.gray, ax=ax) + ax = fig.add_subplot(1, 2, 2) + cmocean.plots.test(cmocean.cm.gray_r, ax=ax) + fig.tight_layout() + + +You can lighten a colormap using an alpha value below 1 with the `cmocean.tools.lighten()` function so that you can overlay contours and other lines that are more easily visible: + +.. plot:: + :include-source: + + import cmocean + import cmocean.cm as cmo + import matplotlib.pyplot as plt + + fig = plt.figure(figsize=(8, 3)) + ax = fig.add_subplot(1, 2, 1) + Z = np.random.randn(10,10) + ax.pcolormesh(Z, cmap=cmo.matter) + + ax = fig.add_subplot(1, 2, 2) + lightcmap = cmocean.tools.lighten(cmo.matter, 0.5) + ax.pcolormesh(Z, cmap=lightcmap) + fig.tight_layout() + + +`cmocean` will register its colormaps with `matplotlib` so you can call them with, for example, 'cmo.amp': + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + fig = plt.figure(figsize=(4, 3)) + ax = fig.add_subplot(111) + Z = np.random.randn(10,10) + ax.pcolormesh(Z, cmap='cmo.amp') + + +Clipping a colormap +^^^^^^^^^^^^^^^^^^^ + +You can clip off one or both ends of a colormap, either by the values you intend to plot with or by percent. For example, you can crop off both ends of a colormap by percent to reduce the lightness range and not have the very darkest values: + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + cmap = cmocean.cm.tarn + fig, axes = plt.subplots(1, 2, figsize=(8,4)) + A = np.random.randint(-5, 6, (10,10)) + mappable = axes[0].pcolormesh(A, cmap=cmap) + axes[0].set_title('Full diverging colormap') + fig.colorbar(mappable, ax=axes[0]) + + newcmap = cmocean.tools.crop_by_percent(cmap, 30, which='both', N=None) + mappable = axes[1].pcolormesh(A, cmap=newcmap) + axes[1].set_title('Same colormap,\n30% removed from each end') + fig.colorbar(mappable, ax=axes[1]) + + +You can clip off one end of a colormap by percent. For example, you can crop the top part of the `oxy` colormap off, in case you are not considering super-saturated conditions (top 20% of the colormap), you can remove it from the colormap as follows: + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + cmap = cmocean.cm.oxy + fig, axes = plt.subplots(1, 2, figsize=(8,4)) + A = np.random.randint(0, 101, (10,10)) + mappable = axes[0].pcolormesh(A, vmin=0, vmax=100, cmap=cmap) + axes[0].set_title('Values go to super-saturated') + fig.colorbar(mappable, ax=axes[0]) + + newcmap = cmocean.tools.crop_by_percent(cmap, 20, which='max', N=None) + A[A>80] = 80 + mappable = axes[1].pcolormesh(A, vmin=0, vmax=80, cmap=newcmap) + axes[1].set_title('Values are all\nbelow super-saturated') + fig.colorbar(mappable, ax=axes[1]) + + +You can remove part of one end of a colormap by inputting the values you intend to use in your plot and let the function figure out how much to crop off the colormap. This could be particularly useful if you have combined bathymetry and topography (sea and land elevations) data to plot with the `topo` colormap, but you want the maximum magnitudes to be different for water and land, and have this reflected in the colormap. + +.. plot:: + :include-source: + + import cmocean + import matplotlib.pyplot as plt + + cmap = cmocean.cm.topo + fig, axes = plt.subplots(1, 2, figsize=(8,4)) + A = np.random.randint(-50, 201, (10,10)) + mappable = axes[0].pcolormesh(A, vmin=-200, vmax=200, cmap=cmap) + axes[0].set_title('No values<-50, but still\nshow possibility in colorbar') + fig.colorbar(mappable, ax=axes[0]) + + newcmap = cmocean.tools.crop(cmap, -50, 200, 0) + mappable = axes[1].pcolormesh(A, vmin=-50, vmax=200, cmap=newcmap) + axes[1].set_title('Colorbar only shows color\nrange used by data') + fig.colorbar(mappable, ax=axes[1]) + + Colormap details ---------------- @@ -55,21 +243,12 @@ thermal The *thermal* colormap is sequential with dark blue representing lower, cooler values and transitioning through reds to yellow representing increased warmer values. -.. figure:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/sci_water_temp.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/ - -.. figure:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/sci_water_temp.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/ +.. figure:: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/sci_water_temp.png + :target: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/ Glider data from Texas A&M's Geochemical and Environmental Research Group (`GERG `_). -.. figure:: http://pong.tamu.edu/~kthyng/movies/txla_plots/temp/2004-07-30T00.png - :target: http://kristenthyng.com/gallery/txla_temp.html - - Model output in the northwest Gulf of Mexico from the Physical Oceanography Numerical Group (`PONG `_) at Texas A&M. - - .. figure:: https://media.springernature.com/m685/springer-static/image/art%3A10.1038%2Fs41598-017-16760-0/MediaObjects/41598_2017_16760_Fig5_HTML.jpg :target: https://www.nature.com/articles/s41598-017-16760-0 @@ -110,16 +289,30 @@ The *thermal* colormap is sequential with dark blue representing lower, cooler v MODIS sea surface temperature from NASA OBPG, by Sebastian Steinke. +.. figure:: https://data.ioos.us/gliders/status/summary/static/profiles/drudnick/sp069-20181109T1607/temperature.png + :target: http://oceansmap.maracoos.org/# + + Glider data from Mid-Atlantic Regional Association Coastal Ocean Observing System (`MARACOOS `_). + + +.. figure:: https://www.tecplot.com/wp-content/gallery/geoscience/pugetsound_webimage.jpg + :target: https://www.tecplot.com/applications/geoscience/ + +Ocean model visualization from `tecplot `_. + + +.. figure:: https://ars.els-cdn.com/content/image/1-s2.0-S0967063718301638-gr2.jpg + :target: https://www.sciencedirect.com/science/article/pii/S0967063718301638 + +Potter, H. (2018). The cold wake of typhoon Chaba (2010). Deep Sea Research Part I: Oceanographic Research Papers, 140, 136-141. + haline ^^^^^^ The *haline* colormap is sequential, and might be used with dark blue representing lower salinity or fresher water, transitioning through greens to light yellow representing increased salinity or saltier water. This colormap is based on matplotlib's YlGnBu, but was recreated from scratch using the viscm tool. -.. figure:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/calc_salinity.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/ - -.. figure:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/calc_salinity.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/ +.. figure:: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/calc_salinity.png + :target: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/ Glider data from Texas A&M's Geochemical and Environmental Research Group (GERG). @@ -146,6 +339,13 @@ The *haline* colormap is sequential, and might be used with dark blue representi Salinity plot of CTD data for the upper ocean; made by Luz Zarate Jimenez. +.. figure:: https://data.ioos.us/gliders/status/summary/static/profiles/drudnick/sp069-20181109T1607/salinity.png + :target: http://oceansmap.maracoos.org/ + +Glider data from Mid-Atlantic Regional Association Coastal Ocean Observing System (`MARACOOS `_). + + + solar ^^^^^ @@ -221,15 +421,20 @@ The *deep* colormap is sequential from light yellow to potentially represent sha Somov Sea bathymetry, by Josué Martinez Moreno, in `blender `_ +.. figure:: https://media.springernature.com/lw900/springer-static/image/art%3A10.1038%2Fs41467-018-05618-2/MediaObjects/41467_2018_5618_Fig1_HTML.png + :target: https://www.nature.com/articles/s41467-018-05618-2 + +Gwyther, D. E., O’Kane, T. J., Galton-Fenzi, B. K., Monselesan, D. P., & Greenbaum, J. S. (2018). Intrinsic processes drive variability in basal melting of the Totten Glacier Ice Shelf. Nature communications, 9(1), 3141. + + + dense ^^^^^ The *dense* colormap is sequential with whitish-blue for low values and increasing in purple with increasing value, which could be used to represent an increase in water density. Two examples of this colormap are shown below, from Texas A&M University gliders. This colormap is based on matplotlib's Purples, but was recreated from scratch using the viscm tool. -.. image:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/calc_density.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/calc_density.png -.. image:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/calc_density.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/calc_density.png +.. image:: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/calc_density.png + :target: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/ .. figure:: https://user-images.githubusercontent.com/3487237/42728541-11ed4d7e-8782-11e8-945c-1e2dcdb61ace.png @@ -248,8 +453,8 @@ algae The *algae* colormap is sequential with whitish-green for low values and increasing in green with increasing value, which could be used to represent an increase in chlorophyll in the water. Two examples of this colormap are shown below, from Texas A&M University gliders. This colormap is based on matplotlib's Greens, but was recreated from scratch using the viscm tool. -.. image:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/sci_flbbcd_chlor_units.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/sci_flbbcd_chlor_units.png +.. image:: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/sci_flbbcd_chlor_units.png + :target: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/ .. figure:: https://rbr-global.com/wp-content/uploads/2016/09/WireWalker_data_wide_zoom.png @@ -270,10 +475,8 @@ matter The *matter* colormap is sequential with whitish-yellow for low values and increasing in pink with increasing value, and could be used to represent an increase in material in the water. Two examples of this colormap are shown below, from Texas A&M University gliders. -.. image:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/sci_flbbcd_cdom_units.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_540/plots/sci_flbbcd_cdom_units.png -.. image:: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/sci_flbbcd_cdom_units.png - :target: http://gcoos2.tamu.edu/gandalf_data/deployments/tamu/unit_541/plots/sci_flbbcd_cdom_units.png +.. image:: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/sci_flbbcd_cdom_units.png + :target: http://gandalf.gcoos.org/data/gandalf/tamu/unit_307/2017/2017_12_18/plots/ .. figure:: http://www.sfestuary.org/wp-content/uploads/2012/09/Nut-model_din-landsatgray-500.jpg @@ -309,6 +512,24 @@ The *amp* colormap is sequential from whitish to dark red and could be used to r Earthquake magnitude, by `Natalie Accardo `_ using GMT. +.. figure:: https://media.springernature.com/lw900/springer-static/image/art%3A10.1038%2Fs41598-018-35936-w/MediaObjects/41598_2018_35936_Fig2_HTML.png + :target: https://www.nature.com/articles/s41598-018-35936-w + + Baumgartner, B. L., O’Laughlin, R., Jin, M., Tsimring, L. S., Hao, N., & Hasty, J. (2018). Flavin-based metabolic cycles are integral features of growth and division in single yeast cells. Scientific reports, 8(1), 18045. + + +.. figure:: https://www.frontiersin.org/files/Articles/422317/fmars-05-00447-HTML/image_m/fmars-05-00447-g004.jpg + :target: https://www.frontiersin.org/articles/10.3389/fmars.2018.00447/full + +Lenhart, H. J., & Große, F. (2018). Assessing the effects of WFD nutrient reductions within an OSPAR frame using trans-boundary nutrient modeling. Frontiers in Marine Science, 5, 447. + + +.. figure:: https://ars.els-cdn.com/content/image/1-s2.0-S0380133018301321-gr4_lrg.jpg + :target: https://www.sciencedirect.com/science/article/pii/S0380133018301321 + +Grunert, B. K., Brunner, S. L., Hamidi, S. A., Bravo, H. R., & Klump, J. V. (2018). Quantifying the influence of cold water intrusions in a shallow, coastal system across contrasting years: Green Bay, Lake Michigan. Journal of Great Lakes Research, 44(5), 851-863. + + tempo ^^^^^ @@ -321,6 +542,18 @@ The *tempo* colormap is sequential from whitish to dark teal and could be used t Estimated nitrate in San Francisco Bay by Rusty Holleman. +rain +^^^^ + +The *rain* colormap is sequential from light, dry colors to blue, wet colors, and could be used to plot amounts of rainfall. + + +.. figure:: https://user-images.githubusercontent.com/3487237/51001559-092d8800-14f6-11e9-93d4-57379b4c7701.png + :target: https://user-images.githubusercontent.com/3487237/51001559-092d8800-14f6-11e9-93d4-57379b4c7701.png + + Rainfall, by Chad Greene. + + phase ^^^^^ @@ -331,6 +564,18 @@ The *phase* colormap is circular, spanning all hues at a set lightness value. Th Tidal phase in the North Atlantic ocean, by Kristen Thyng. +topo +^^^^ + +The *topo* colormap has two distinct parts: one that is shades of blue and yellow to represent water depths (this is the *deep* colormap) and one that is shades of browns and greens to represent land elevation. + + +.. figure:: https://user-images.githubusercontent.com/3487237/51001557-0894f180-14f6-11e9-9f8e-94fc0ffcfe11.png + :target: https://user-images.githubusercontent.com/3487237/51001557-0894f180-14f6-11e9-9f8e-94fc0ffcfe11.png + + Bathymetry and topography, by Chad Greene. + + balance ^^^^^^^ @@ -363,116 +608,42 @@ The *delta* colormap is diverging from darker blues to just off-white through sh curl ^^^^ -The *curl* colormap is diverging from darker teal to just off-white through shades of magenta and could be used to represent diverging vorticity values around a critical value (usually zero). An example of this colormap is from a numerical simulation of the Texas and Louisiana shelf. +The *curl* colormap is diverging from darker teal to just off-white through shades of magenta and could be used to represent diverging vorticity values around a critical value (usually zero). .. figure:: http://pong.tamu.edu/~kthyng/movies/txla_plots/vort/2010-07-30T00.png :target: http://pong.tamu.edu/~kthyng/movies/txla_plots/vort/2010.mp4 + An example of this colormap is from a numerical simulation of the Texas and Louisiana shelf. + .. figure:: https://pbs.twimg.com/media/CuqlwdJWIAA1wT1.jpg :target: https://plot.ly/~empet/13557/cmoceanvorticity-colorscale Julia Set fractal in `plotly `_ -Capabilities ------------- - -The colormaps are all available in ``cmocean.cm``. They can be accessed, and simply plotted, as follows: - -.. plot:: - :include-source: - - import cmocean - import matplotlib.pyplot as plt - - fig = plt.figure(figsize=(8, 3)) - ax = fig.add_subplot(1, 2, 1) - cmocean.plots.test(cmocean.cm.thermal, ax=ax) - ax = fig.add_subplot(1, 2, 2) - cmocean.plots.quick_plot(cmocean.cm.algae, ax=ax) - -All available colormap names can be accessed with ``cmocean.cm.cmapnames``: - -.. ipython:: python - - import cmocean - - cmocean.cm.cmapnames - - -The colormap instances can be accessed with: - -.. ipython:: python - - import cmocean - - cmaps = cmocean.cm.cmap_d; - -Print all of the available colormaps to text files with 256 rgb entries with: - -``cmaps = cmocean.cm.cmap_d`` - -``cmocean.tools.print_colormaps(cmaps)`` - -Output a dictionary to define a colormap with: - -.. ipython:: python - - import cmocean - cmdict = cmocean.tools.get_dict(cmocean.cm.matter, N=9) - print(cmdict) - -Make a colormap instance with ``cmap = cmocean.tools.cmap(rgbin, N=10)`` given the rgb input array. - -Reversed versions of all colormaps are available by appending "_r" to the colormap name, just as in matplotlib: - -.. plot:: - :include-source: - - import cmocean - import matplotlib.pyplot as plt +diff +^^^^ - fig = plt.figure(figsize=(8, 3)) - ax = fig.add_subplot(1, 2, 1) - cmocean.plots.test(cmocean.cm.gray, ax=ax) - ax = fig.add_subplot(1, 2, 2) - cmocean.plots.test(cmocean.cm.gray_r, ax=ax) - fig.tight_layout() +The *diff* colormap is diverging, with one side shades of blues and one side shades of browns. -You can lighten a colormap using an alpha value below 1 with the `cmocean.tools.lighten()` function so that you can overlay contours and other lines that are more easily visible: +.. figure:: https://user-images.githubusercontent.com/3487237/51001561-092d8800-14f6-11e9-868b-009e947ed5eb.png + :target: https://user-images.githubusercontent.com/3487237/51001561-092d8800-14f6-11e9-868b-009e947ed5eb.png -.. plot:: - :include-source: + Surface pressure anomaly for December 2017, by Chad Greene. - import cmocean - import cmocean.cm as cmo - import matplotlib.pyplot as plt - - fig = plt.figure(figsize=(8, 3)) - ax = fig.add_subplot(1, 2, 1) - Z = np.random.randn(10,10) - ax.pcolormesh(Z, cmap=cmo.matter) - - ax = fig.add_subplot(1, 2, 2) - lightcmap = cmocean.tools.lighten(cmo.matter, 0.5) - ax.pcolormesh(Z, cmap=lightcmap) - fig.tight_layout() +tarn +^^^^ -`cmocean` will register its colormaps with `matplotlib` so you can call them with, for example, 'cmo.amp': +The *tarn* colormap is diverging, with one side dry shades of browns and the other a range of greens and blues. The positive end of the colormap is meant to reflect the colors in *rain* and thus be a complementary colormap to *rain* for rain anomaly (around 0 or some other critical value). -.. plot:: - :include-source: - import cmocean - import matplotlib.pyplot as plt +.. figure:: https://user-images.githubusercontent.com/3487237/51001558-0894f180-14f6-11e9-91e1-3ef9e28fcc81.png + :target: https://user-images.githubusercontent.com/3487237/51001558-0894f180-14f6-11e9-91e1-3ef9e28fcc81.png - fig = plt.figure(figsize=(4, 3)) - ax = fig.add_subplot(111) - Z = np.random.randn(10,10) - ax.pcolormesh(Z, cmap='cmo.amp') + Rain anomaly, by Chad Greene. Resources @@ -497,10 +668,6 @@ cmocean available elsewhere! * `colormap `_ * `julia `_ * Spatial Temporal Oceanographic Query System `(STOQS) `_ is a geospatial database software package designed for providing efficient access to in situ oceanographic measurement data. -* cmocean colormaps are used in the following publications: - * Kenel, C., Grolimund, D., Li, X., Panepucci, E., Samson, V. A., Sanchez, D. F., ... & Leinenbach, C. (2017). In situ investigation of phase transformations in Ti-6Al-4V under additive manufacturing conditions combining laser melting and high-speed micro-X-ray diffraction. Scientific reports, 7(1), 16358. ``_ - * Usamentiaga, R., Ibarra-Castanedo, C., Klein, M., Maldague, X., Peeters, J., & Sanchez-Beato, A. (2017). Nondestructive evaluation of carbon fiber bicycle frames using infrared thermography. Sensors, 17(11), 2679. ``_ - * WUNSCH, C. (2018). Towards determining uncertainties in global oceanic mean values of heat, salt, and surface elevation. Tellus A: Dynamic Meteorology and Oceanography, 70(1), 1-14. ``_ Examples of beautiful visualizations: diff --git a/setup.py b/setup.py index 42fe62b..633a4d1 100644 --- a/setup.py +++ b/setup.py @@ -26,11 +26,11 @@ def run_tests(self): setup( name = "cmocean", - version = "1.2", + version = "2.0", author = "Kristen Thyng", author_email = "kthyng@gmail.com", url = 'https://github.com/matplotlib/cmocean', - download_url = 'https://github.com/matplotlib/cmocean/tarball/1.1', + download_url = 'https://github.com/matplotlib/cmocean/tarball/2.0', description = ("Colormaps for Oceanography"), long_description=open('README.md').read(), long_description_content_type='text/markdown',