Skip to content

Commit dc166b3

Browse files
committed
renames colormap sunlight to twilight_shifted
1 parent a5fbf18 commit dc166b3

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Wrapping colormaps
22
------------------
33

4-
Two new colormaps named 'twilight' and 'sunlight' were added. These
5-
colormaps start and end on the same color, and have two symmetric
6-
halves with equal lightness, but diverging color. Since they wrap
7-
around, they are a good choice for cyclic data such as phase angles,
8-
compass directions, or time of day. Like viridis, twilight and
9-
sunlight are perceptually uniform and colorblind friendly.
4+
Two new colormaps named 'twilight' and 'twilight_shifted' were added.
5+
These colormaps start and end on the same color, and have two
6+
symmetric halves with equal lightness, but diverging color. Since they
7+
wrap around, they are a good choice for cyclic data such as phase
8+
angles, compass directions, or time of day. Like viridis, twilight is
9+
perceptually uniform and colorblind friendly.

examples/color/colormap_reference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
('Diverging', [
3030
'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu',
3131
'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic']),
32-
('Wrapping', ['twilight', 'sunlight', 'hsv']),
32+
('Wrapping', ['twilight', 'twilight_shifted', 'hsv']),
3333
('Qualitative', [
3434
'Pastel1', 'Pastel2', 'Paired', 'Accent',
3535
'Dark2', 'Set1', 'Set2', 'Set3',

lib/matplotlib/_cm_listed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,8 +1797,8 @@
17971797
[0.88554714811952384, 0.84987174283631584, 0.88336206121170946],
17981798
[0.88571155122845646, 0.85002186115856315, 0.88572538990087124]]
17991799

1800-
_sunlight_data = (_twilight_data[len(_twilight_data)//2:] +
1801-
_twilight_data[:len(_twilight_data)//2])
1800+
_twilight_shifted_data = (_twilight_data[len(_twilight_data)//2:] +
1801+
_twilight_data[:len(_twilight_data)//2])
18021802

18031803
cmaps = {}
18041804
for (name, data) in (('magma', _magma_data),
@@ -1807,7 +1807,7 @@
18071807
('viridis', _viridis_data),
18081808
('cividis', _cividis_data),
18091809
('twilight', _twilight_data),
1810-
('sunlight', _sunlight_data)):
1810+
('twilight_shifted', _twilight_shifted_data)):
18111811

18121812
cmaps[name] = ListedColormap(data, name=name)
18131813
# generate reversed colormap

lib/matplotlib/pyplot.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,14 +1810,14 @@ def colormaps():
18101810
18111811
A set of cyclic color maps:
18121812
1813-
========== =========================================================
1814-
Colormap Description
1815-
========== =========================================================
1816-
hsv red-yellow-green-cyan-blue-magenta-red, formed by changing
1817-
the hue component in the HSV color space
1818-
twilight perceptually uniform shades of white-blue-black-red-white
1819-
sunlight perceptually uniform shades of black-red-white-blue-black
1820-
========== =========================================================
1813+
================ =========================================================
1814+
Colormap Description
1815+
================ =========================================================
1816+
hsv red-yellow-green-cyan-blue-magenta-red, formed by changing
1817+
the hue component in the HSV color space
1818+
twilight perceptually uniform shades of white-blue-black-red-white
1819+
twilight_shifted perceptually uniform shades of black-red-white-blue-black
1820+
================ =========================================================
18211821
18221822
18231823
Other miscellaneous schemes:

tutorials/colors/colormaps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
# for viewers to see perceptually. See an extension on this idea at
148148
# [mycarta-jet]_.
149149

150-
cmaps['Wrapping'] = ['twilight', 'sunlight', 'hsv']
150+
cmaps['Wrapping'] = ['twilight', 'twilight_shifted', 'hsv']
151151

152152
###############################################################################
153153
# Qualitative

0 commit comments

Comments
 (0)