matplotlib modified color map with white as zero
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.
Some of the standard matplotlib cmaps, 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?