I am trying to plot a heatmap using patches. However, the data contains NaNs and sets all colours to the minimum value if the NaN values are included. If I set NaNs to 0, the plot is illustrated correctly. But I do not wish to set NaNs to a value, as this is misleading. Ideally, I would like to skip NaN values, if not at least set it to a desired colour
I have made sure to use nanmin/nanmax for the color bar to exclude NaN values from the scale.
Plotting from -2000:2000 across 400 elements, I have set index values 200:250 to NaN
The above code was used to produce below: https://www.pastepic.xyz/images/2019/10/17/image9347fc65ec10705e.png
However, the inclusion of NaNS leads to this https://www.pastepic.xyz/images/2019/10/17/imagef0c34416d84b669d.png