| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,9 +1,9 @@ | |||
| 1 | 1 | Wrapping colormaps | |
| 2 | 2 | ------------------ | |
| 3 | 3 | ||
| 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. | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -29,7 +29,7 @@ | |||
| 29 | 29 | ('Diverging', [ | |
| 30 | 30 | 'PiYG', 'PRGn', 'BrBG', 'PuOr', 'RdGy', 'RdBu', | |
| 31 | 31 | 'RdYlBu', 'RdYlGn', 'Spectral', 'coolwarm', 'bwr', 'seismic']), | |
| 32 | - ('Wrapping', ['twilight', 'sunlight', 'hsv']), | ||
| 32 | + ('Wrapping', ['twilight', 'twilight_shifted', 'hsv']), | ||
| 33 | 33 | ('Qualitative', [ | |
| 34 | 34 | 'Pastel1', 'Pastel2', 'Paired', 'Accent', | |
| 35 | 35 | 'Dark2', 'Set1', 'Set2', 'Set3', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1797,8 +1797,8 @@ | |||
| 1797 | 1797 | [0.88554714811952384, 0.84987174283631584, 0.88336206121170946], | |
| 1798 | 1798 | [0.88571155122845646, 0.85002186115856315, 0.88572538990087124]] | |
| 1799 | 1799 | ||
| 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]) | ||
| 1802 | 1802 | ||
| 1803 | 1803 | cmaps = {} | |
| 1804 | 1804 | for (name, data) in (('magma', _magma_data), | |
@@ -1807,7 +1807,7 @@ | |||
| 1807 | 1807 | ('viridis', _viridis_data), | |
| 1808 | 1808 | ('cividis', _cividis_data), | |
| 1809 | 1809 | ('twilight', _twilight_data), | |
| 1810 | - ('sunlight', _sunlight_data)): | ||
| 1810 | + ('twilight_shifted', _twilight_shifted_data)): | ||
| 1811 | 1811 | ||
| 1812 | 1812 | cmaps[name] = ListedColormap(data, name=name) | |
| 1813 | 1813 | # generate reversed colormap | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1810,14 +1810,14 @@ def colormaps(): | |||
| 1810 | 1810 | ||
| 1811 | 1811 | A set of cyclic color maps: | |
| 1812 | 1812 | ||
| 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 | + ================ ========================================================= | ||
| 1821 | 1821 | ||
| 1822 | 1822 | ||
| 1823 | 1823 | Other miscellaneous schemes: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -147,7 +147,7 @@ | |||
| 147 | 147 | # for viewers to see perceptually. See an extension on this idea at | |
| 148 | 148 | # [mycarta-jet]_. | |
| 149 | 149 | ||
| 150 | - cmaps['Wrapping'] = ['twilight', 'sunlight', 'hsv'] | ||
| 150 | + cmaps['Wrapping'] = ['twilight', 'twilight_shifted', 'hsv'] | ||
| 151 | 151 | ||
| 152 | 152 | ############################################################################### | |
| 153 | 153 | # Qualitative | |
| Back | FazBrowse Home | New Git URL |
0 commit comments