NF Add Blue/Purple/Red/Orange/Green colormap#395
Conversation
|
The color blocks seem a bit vertically mis-aligned to me (both in the example and in the actual PNG) -- is that the case, or is it an illusion that they are mis-aligned? |
|
Also, do we have any procedure for deciding what colormaps to add to pycortex, or do we just add whichever colormaps people would like to add? |
It's an illusion. Each color has 51 pixels. This is how the colormap was generated import numpy as np
new_colors = np.array([
[0, 138, 255, 255], # Blue
[186, 16, 255, 255], # Violet
[255, 23, 36, 255], # Red
[255, 108, 1, 255], # Orange
[151, 214, 1, 255], # Lime green
])/255.
new_colormap = np.repeat(new_colors[None], 51, axis=1)
# new_colormap.shape = (1, 255, 4)I don't think we have any formal decision process. It's fairly easy to use custom colormaps, and the user can specify their own colormap directory (but this should probably be better documented). |
|
Maybe we could have some section on the pycortex documentation page that
organizes the colormaps somehow, since the current list is quite long --
maybe something like how they give lists of "perceptually uniform",
"sequential", "diverging", "qualitative" etc colormaps in matplotlib (
https://matplotlib.org/stable/tutorials/colors/colormaps.html). Or do you
think the overhead of maintaining the list would not be worth it?
El dom, 27 jun 2021 a las 17:44, Matteo Visconti di Oleggio Castello (<
***@***.***>) escribió:
… The color blocks seem a bit vertically mis-aligned to me (both in the
example and in the actual PNG) -- is that the case, or is it an illusion
that they are mis-aligned?
It's an illusion. Each color has 51 pixels. This is how the colormap was
generated
import numpy as npnew_colors = np.array([
[0, 138, 255, 255], # Blue
[186, 16, 255, 255], # Violet
[255, 23, 36, 255], # Red
[255, 108, 1, 255], # Orange
[151, 214, 1, 255], # Lime green
])/255.
new_colormap = np.repeat(new_colors[None], 51, axis=1)# new_colormap.shape = (1, 255, 4)
I don't think we have any formal decision process. It's fairly easy to use
custom colormaps, and the user can specify their own colormap directory
(but this should probably be better documented).
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#395 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACOSJVQR7PEOKS5XPDZSMRDTU7AWHANCNFSM47KROFDA>
.
|
|
Either way, though, this PR seems fine to me. I think determining how to organize the colormaps/which colormaps to add should be a separate discussion.
El lun, 28 jun 2021 a las 14:23, Cathy Chen ***@***.***>)
escribió:
… Maybe we could have some section on the pycortex documentation page that
organizes the colormaps somehow, since the current list is quite long --
maybe something like how they give lists of "perceptually uniform",
"sequential", "diverging", "qualitative" etc colormaps in matplotlib (
https://matplotlib.org/stable/tutorials/colors/colormaps.html). Or do you
think the overhead of maintaining the list would not be worth it?
El dom, 27 jun 2021 a las 17:44, Matteo Visconti di Oleggio Castello (<
***@***.***>) escribió:
> The color blocks seem a bit vertically mis-aligned to me (both in the
> example and in the actual PNG) -- is that the case, or is it an illusion
> that they are mis-aligned?
>
> It's an illusion. Each color has 51 pixels. This is how the colormap was
> generated
>
> import numpy as npnew_colors = np.array([
> [0, 138, 255, 255], # Blue
> [186, 16, 255, 255], # Violet
> [255, 23, 36, 255], # Red
> [255, 108, 1, 255], # Orange
> [151, 214, 1, 255], # Lime green
> ])/255.
> new_colormap = np.repeat(new_colors[None], 51, axis=1)# new_colormap.shape = (1, 255, 4)
>
> I don't think we have any formal decision process. It's fairly easy to
> use custom colormaps, and the user can specify their own colormap directory
> (but this should probably be better documented).
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#395 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACOSJVQR7PEOKS5XPDZSMRDTU7AWHANCNFSM47KROFDA>
> .
>
|
I agree, let's merge this PR.
I agree, at least we could have a short page describing a small number of good default choices. |
Example
