-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
045c8d5
commit 35b2395
Showing
2 changed files
with
313 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,256 @@ | ||
0 27 56 | ||
0 29 61 | ||
0 32 65 | ||
0 34 69 | ||
0 36 73 | ||
0 39 77 | ||
0 41 82 | ||
0 43 86 | ||
0 45 90 | ||
0 48 94 | ||
0 50 99 | ||
0 52 103 | ||
0 55 107 | ||
0 57 111 | ||
0 59 115 | ||
0 62 120 | ||
0 64 124 | ||
0 66 128 | ||
0 69 132 | ||
0 71 136 | ||
0 73 141 | ||
0 75 145 | ||
0 78 149 | ||
0 80 153 | ||
0 82 158 | ||
0 85 162 | ||
2 88 165 | ||
6 92 166 | ||
11 96 168 | ||
15 100 170 | ||
19 104 171 | ||
24 108 173 | ||
28 112 174 | ||
32 116 176 | ||
37 120 178 | ||
41 124 179 | ||
45 128 181 | ||
49 132 183 | ||
54 136 184 | ||
58 140 186 | ||
62 144 188 | ||
67 148 189 | ||
71 152 191 | ||
75 156 192 | ||
80 160 194 | ||
84 164 196 | ||
88 168 197 | ||
93 172 199 | ||
97 176 201 | ||
101 180 202 | ||
105 184 204 | ||
110 188 206 | ||
105 186 197 | ||
101 184 189 | ||
97 182 181 | ||
93 180 173 | ||
88 177 165 | ||
84 175 157 | ||
80 173 149 | ||
75 171 141 | ||
71 169 133 | ||
67 167 125 | ||
62 165 117 | ||
58 163 109 | ||
54 161 101 | ||
49 159 93 | ||
45 157 85 | ||
41 155 77 | ||
37 153 69 | ||
32 151 60 | ||
28 149 52 | ||
24 147 44 | ||
19 145 36 | ||
15 142 28 | ||
11 140 20 | ||
6 138 12 | ||
2 136 4 | ||
3 136 0 | ||
10 139 0 | ||
17 141 0 | ||
24 143 0 | ||
30 145 0 | ||
37 147 0 | ||
44 149 0 | ||
51 152 0 | ||
57 154 0 | ||
64 156 0 | ||
71 158 0 | ||
78 160 0 | ||
84 163 0 | ||
91 165 0 | ||
98 167 0 | ||
105 169 0 | ||
112 171 0 | ||
118 173 0 | ||
125 176 0 | ||
132 178 0 | ||
139 180 0 | ||
145 182 0 | ||
152 184 0 | ||
159 187 0 | ||
166 189 0 | ||
172 191 0 | ||
176 193 9 | ||
179 196 19 | ||
182 198 28 | ||
185 201 37 | ||
189 203 47 | ||
192 206 56 | ||
195 208 66 | ||
199 211 75 | ||
202 214 84 | ||
205 216 94 | ||
208 219 103 | ||
212 221 112 | ||
215 224 122 | ||
218 226 131 | ||
221 229 140 | ||
225 231 150 | ||
228 234 159 | ||
231 236 169 | ||
235 239 178 | ||
238 241 187 | ||
241 244 197 | ||
244 246 206 | ||
248 249 215 | ||
251 251 225 | ||
254 254 234 | ||
255 254 235 | ||
255 251 227 | ||
255 248 218 | ||
255 245 210 | ||
255 242 202 | ||
255 239 194 | ||
255 236 186 | ||
255 233 177 | ||
255 230 169 | ||
255 227 161 | ||
255 224 153 | ||
255 222 145 | ||
255 219 136 | ||
255 216 128 | ||
255 213 120 | ||
255 210 112 | ||
255 207 104 | ||
255 204 96 | ||
255 201 87 | ||
255 198 79 | ||
255 195 71 | ||
255 192 63 | ||
255 190 55 | ||
255 187 46 | ||
255 184 38 | ||
255 181 30 | ||
254 175 31 | ||
253 168 32 | ||
251 162 33 | ||
250 156 33 | ||
249 150 34 | ||
247 144 35 | ||
246 137 36 | ||
244 131 36 | ||
243 125 37 | ||
241 119 38 | ||
240 112 39 | ||
238 106 40 | ||
237 100 40 | ||
236 94 41 | ||
234 88 42 | ||
233 81 43 | ||
231 75 44 | ||
230 69 44 | ||
228 63 45 | ||
227 57 46 | ||
226 50 47 | ||
224 44 47 | ||
223 38 48 | ||
221 32 49 | ||
220 26 50 | ||
218 22 49 | ||
216 21 47 | ||
214 20 45 | ||
212 19 43 | ||
211 18 41 | ||
209 18 39 | ||
207 17 37 | ||
205 16 35 | ||
203 15 33 | ||
201 14 32 | ||
199 13 30 | ||
197 12 28 | ||
195 11 26 | ||
194 11 24 | ||
192 10 22 | ||
190 9 20 | ||
188 8 18 | ||
186 7 16 | ||
184 6 14 | ||
182 5 12 | ||
180 4 10 | ||
178 4 8 | ||
176 3 6 | ||
175 2 4 | ||
173 1 2 | ||
171 0 0 | ||
174 6 10 | ||
177 12 20 | ||
181 19 30 | ||
184 25 40 | ||
187 31 50 | ||
191 37 60 | ||
194 44 70 | ||
197 50 80 | ||
201 56 90 | ||
204 62 100 | ||
207 69 110 | ||
211 75 120 | ||
214 81 130 | ||
217 87 140 | ||
221 94 150 | ||
224 100 160 | ||
227 106 171 | ||
231 112 181 | ||
234 119 191 | ||
237 125 201 | ||
241 131 211 | ||
244 137 221 | ||
247 144 231 | ||
251 150 241 | ||
254 156 251 | ||
255 156 255 | ||
253 150 254 | ||
252 144 254 | ||
250 137 253 | ||
248 131 252 | ||
247 125 251 | ||
245 119 250 | ||
244 112 249 | ||
242 106 248 | ||
240 100 247 | ||
239 94 246 | ||
237 87 245 | ||
235 81 244 | ||
234 75 244 | ||
232 69 243 | ||
230 62 242 | ||
229 56 241 | ||
227 50 240 | ||
226 44 239 | ||
224 37 238 | ||
222 31 237 | ||
221 25 236 | ||
219 19 235 | ||
217 12 234 | ||
216 6 234 | ||
214 0 233 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
''' | ||
Colormap created using https://syedha.com/colormaps | ||
''' | ||
# import numpy as np | ||
# import matplotlib as mpl | ||
# import os | ||
|
||
|
||
# # Define colormap data | ||
# data_dir = os.path.split(__file__)[0] | ||
# syed_spectral_vals = np.genfromtxt(os.path.join(data_dir, 'SyedSpectral_RGB.txt')) | ||
# cmap_data = { | ||
# 'SyedSpectral': syed_spectral_vals, | ||
# } | ||
|
||
# # Register colormaps | ||
# for cmap_name, rgb_colors in cmap_data.items(): | ||
# # Normalize the RGB values to the range [0, 1] | ||
# c = rgb_colors / 255.0 | ||
|
||
# # Create a ListedColormap | ||
# cmap = mpl.colors.ListedColormap(c) | ||
|
||
# # Register the colormap | ||
# mpl.colormaps.register(cmap=cmap, name=cmap_name, force=True) | ||
|
||
# # Usage example: | ||
# if __name__ == "__main__": | ||
# # Now you can use 'SyedSpectral' colormap in your plots | ||
# pass | ||
|
||
|
||
import numpy as np | ||
import matplotlib as mpl | ||
import os | ||
|
||
def register_colormap(data_dir): | ||
# Define colormap data | ||
# data_dir = os.path.split(__file__)[0] | ||
syed_spectral_vals = np.genfromtxt(os.path.join(data_dir, 'SyedSpectral_RGB.txt')) | ||
cmap_data = { | ||
'SyedSpectral': syed_spectral_vals, | ||
} | ||
|
||
# Register colormaps | ||
for cmap_name, rgb_colors in cmap_data.items(): | ||
# Normalize the RGB values to the range [0, 1] | ||
c = rgb_colors / 255.0 | ||
|
||
# Create a ListedColormap | ||
cmap = mpl.colors.ListedColormap(c) | ||
|
||
# Register the colormap | ||
mpl.colormaps.register(cmap=cmap, name=cmap_name, force=True) | ||
|
||
# data_dir = os.path.split(__file__)[0] | ||
SyedSpectral = register_colormap(data_dir = os.path.split(__file__)[0]) |