highlight regions of no data in a Python imshow plot
try setting those values to np.nan ( or float('nan')); you may also want to pass interpolation='nearest' to imshow as an argument.
I am producing an imshow plot in Python.
In the final plot, I have strips/columns of data, between which there is no data at all - kind of like a barcode.
At the moment, where I have no data, I have just set all values to zero. The color of these regions of no data is therefore whatever colour represents zero in my colorbar - green in my case.
What I really want is for these columns/strips just to be white, and to make to really clear that these are regions of NO data.
I realise that I could change the colorbar so that the zero is white, but I really want to distinguish the regions of no data from any zeros that might be in the data.
Thank you.