Some of the standard matplotlib
cmap
s, such as viridis
or jet
show dark colors in small values. While this is what I need, I like them to show nothing, i.e. white background if the value is exactly zero. For non zero values the usual colors of that color map are fine.
Is it possible to do this?
You would rather mask zero out of your data, e.g. setting those values to nan
or use a masked array. Then you can just set_bad("white")
for your colormap.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With