You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I am trying to create colorscheme that I want to use in the heatmap of makie for now I use greys and It works quite well but
I would like to implement windows
so pixels below given value a should be black
all above given value b should be white
different shades of grey for all values between a and b and proportional to those values
How to achieve this?
Thank you for help!
Below What Is already achieved but without windows
The text was updated successfully, but these errors were encountered:
Hi Jakub! Assuming you can pass in normalised values from 0 to 1 in Makie, you can do this with ColorSchemeTools.jl:
using ColorSchemes, ColorSchemeTools
functionf(n, a, b)
if n < a
return0elseif n > b
return1elsereturn ColorSchemes.remap(n, a, b, 0, 1)
endend
a =0.3
b =0.8
newscheme =make_colorscheme(n ->f(n, a, b), n ->f(n, a, b), n ->f(n, a, b),
length=100,
category =" ... ",
notes =" ... ")
Hello I am trying to create colorscheme that I want to use in the heatmap of makie for now I use greys and It works quite well but
I would like to implement windows
so pixels below given value a should be black
all above given value b should be white
different shades of grey for all values between a and b and proportional to those values
How to achieve this?
Thank you for help!
Below What Is already achieved but without windows
The text was updated successfully, but these errors were encountered: