I’m trying to plot some data using a contour plot in Makie. My data has both negative and positive peaks. Near zero, there is a lot of noise. I want to highlight just the main peaks and valleys and I’d like anything near zero to be white. Makie’s contourf
function has a :relative
mode (see here) where you can drop either the high or low ranges, say the bottom 10%. I would like to drop the middle 10% or so, or somehow set the middle to be white so the peaks are easily identifiable.
I’ve tried creating two contour plots and overlapping them: one with the highest 95% (positive values) and one with the lowest 95% (the negative values). This actually gets very close to what I want, visually, but then each plot has its own Colorbar
(blue gradient for positive and red for negative), which is not desirable.
Another option would be to apply a filter to the dataset and set very small values to zero, but I don’t really want to be manipulating the data.
Is there a way I haven’t thought of? Maybe there’s a way to set the levels that I’m not thinking of?
Here’s an example of roughly what I would like to achieve (this is not my data, but is similar, and I’m not sure how it was generated):