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

Skip to content

Commit 5fca395

Browse files
committed
align nipy_spectral_data, double backquotes
1 parent 6e3a6ae commit 5fca395

2 files changed

Lines changed: 36 additions & 34 deletions

File tree

lib/matplotlib/_cm.py

Lines changed: 35 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -343,39 +343,41 @@ def gfunc32(x):
343343
'green': ((0., 0., 0.),(1.0, 1.0, 1.0)),
344344
'blue': ((0., 1., 1.),(1.0, 0.5, 0.5))}
345345

346-
_nipy_spectral_data = {'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667),
347-
(0.10, 0.5333, 0.5333), (0.15, 0.0, 0.0),
348-
(0.20, 0.0, 0.0), (0.25, 0.0, 0.0),
349-
(0.30, 0.0, 0.0), (0.35, 0.0, 0.0),
350-
(0.40, 0.0, 0.0), (0.45, 0.0, 0.0),
351-
(0.50, 0.0, 0.0), (0.55, 0.0, 0.0),
352-
(0.60, 0.0, 0.0), (0.65, 0.7333, 0.7333),
353-
(0.70, 0.9333, 0.9333), (0.75, 1.0, 1.0),
354-
(0.80, 1.0, 1.0), (0.85, 1.0, 1.0),
355-
(0.90, 0.8667, 0.8667), (0.95, 0.80, 0.80),
356-
(1.0, 0.80, 0.80)],
357-
'green': [(0.0, 0.0, 0.0), (0.05, 0.0, 0.0),
358-
(0.10, 0.0, 0.0), (0.15, 0.0, 0.0),
359-
(0.20, 0.0, 0.0), (0.25, 0.4667, 0.4667),
360-
(0.30, 0.6000, 0.6000), (0.35, 0.6667, 0.6667),
361-
(0.40, 0.6667, 0.6667), (0.45, 0.6000, 0.6000),
362-
(0.50, 0.7333, 0.7333), (0.55, 0.8667, 0.8667),
363-
(0.60, 1.0, 1.0), (0.65, 1.0, 1.0),
364-
(0.70, 0.9333, 0.9333), (0.75, 0.8000, 0.8000),
365-
(0.80, 0.6000, 0.6000), (0.85, 0.0, 0.0),
366-
(0.90, 0.0, 0.0), (0.95, 0.0, 0.0),
367-
(1.0, 0.80, 0.80)],
368-
'blue': [(0.0, 0.0, 0.0), (0.05, 0.5333, 0.5333),
369-
(0.10, 0.6000, 0.6000), (0.15, 0.6667, 0.6667),
370-
(0.20, 0.8667, 0.8667), (0.25, 0.8667, 0.8667),
371-
(0.30, 0.8667, 0.8667), (0.35, 0.6667, 0.6667),
372-
(0.40, 0.5333, 0.5333), (0.45, 0.0, 0.0),
373-
(0.5, 0.0, 0.0), (0.55, 0.0, 0.0),
374-
(0.60, 0.0, 0.0), (0.65, 0.0, 0.0),
375-
(0.70, 0.0, 0.0), (0.75, 0.0, 0.0),
376-
(0.80, 0.0, 0.0), (0.85, 0.0, 0.0),
377-
(0.90, 0.0, 0.0), (0.95, 0.0, 0.0),
378-
(1.0, 0.80, 0.80)]}
346+
_nipy_spectral_data = {
347+
'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667),
348+
(0.10, 0.5333, 0.5333), (0.15, 0.0, 0.0),
349+
(0.20, 0.0, 0.0), (0.25, 0.0, 0.0),
350+
(0.30, 0.0, 0.0), (0.35, 0.0, 0.0),
351+
(0.40, 0.0, 0.0), (0.45, 0.0, 0.0),
352+
(0.50, 0.0, 0.0), (0.55, 0.0, 0.0),
353+
(0.60, 0.0, 0.0), (0.65, 0.7333, 0.7333),
354+
(0.70, 0.9333, 0.9333), (0.75, 1.0, 1.0),
355+
(0.80, 1.0, 1.0), (0.85, 1.0, 1.0),
356+
(0.90, 0.8667, 0.8667), (0.95, 0.80, 0.80),
357+
(1.0, 0.80, 0.80)],
358+
'green': [(0.0, 0.0, 0.0), (0.05, 0.0, 0.0),
359+
(0.10, 0.0, 0.0), (0.15, 0.0, 0.0),
360+
(0.20, 0.0, 0.0), (0.25, 0.4667, 0.4667),
361+
(0.30, 0.6000, 0.6000), (0.35, 0.6667, 0.6667),
362+
(0.40, 0.6667, 0.6667), (0.45, 0.6000, 0.6000),
363+
(0.50, 0.7333, 0.7333), (0.55, 0.8667, 0.8667),
364+
(0.60, 1.0, 1.0), (0.65, 1.0, 1.0),
365+
(0.70, 0.9333, 0.9333), (0.75, 0.8000, 0.8000),
366+
(0.80, 0.6000, 0.6000), (0.85, 0.0, 0.0),
367+
(0.90, 0.0, 0.0), (0.95, 0.0, 0.0),
368+
(1.0, 0.80, 0.80)],
369+
'blue': [(0.0, 0.0, 0.0), (0.05, 0.5333, 0.5333),
370+
(0.10, 0.6000, 0.6000), (0.15, 0.6667, 0.6667),
371+
(0.20, 0.8667, 0.8667), (0.25, 0.8667, 0.8667),
372+
(0.30, 0.8667, 0.8667), (0.35, 0.6667, 0.6667),
373+
(0.40, 0.5333, 0.5333), (0.45, 0.0, 0.0),
374+
(0.5, 0.0, 0.0), (0.55, 0.0, 0.0),
375+
(0.60, 0.0, 0.0), (0.65, 0.0, 0.0),
376+
(0.70, 0.0, 0.0), (0.75, 0.0, 0.0),
377+
(0.80, 0.0, 0.0), (0.85, 0.0, 0.0),
378+
(0.90, 0.0, 0.0), (0.95, 0.0, 0.0),
379+
(1.0, 0.80, 0.80)],
380+
}
379381

380382

381383
# 34 colormaps based on color specifications and designs

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1909,7 +1909,7 @@ def colormaps():
19091909
19101910
.. [#] Changed to distinguish from ColorBrewer's *Spectral* map.
19111911
:func:`spectral` still works, but
1912-
`set_cmap('nipy_spectral')` is recommended for clarity.
1912+
``set_cmap('nipy_spectral')`` is recommended for clarity.
19131913
19141914
19151915
"""

0 commit comments

Comments
 (0)