Open alex-robinson opened 1 year ago
if you want to see the "highclip" triangle, you need to tell it what color you want to clip to:
julia> f, ax, hm = heatmap(z,colorrange=(0.2,0.8), highclip = :red, lowclip = :blue);
julia> cb = Colorbar(f[:,end+1],hm,ticks=(0.0:0.2:1.0,string.(0.0:0.2:1.0)));
Yes, I have seen that this is possible, and this is a good tip to work around this issue. But it is not ideal, for example, when I want the triangles to assume the same first and last colors as determined by the colormap
argument. Is there a way to tell heatmap
to use those colors without explicitly figuring out what they are myself? I would hope that the function itself could do that work for me.
None of the original examples show triangles anymore
When using
heatmap
together withColorbar
, the resulting colorbar does not accurately reflect the bounds of the data. In some cases, extending triangles are shown for data values outside ofcolorrange
when they shouldn't be, and vice versa. This behavior is also not consistent withcontourf
. This makes it difficult to use despite being a central plotting component for many analyses.As a user, it would be very valuable to see the following improvements:
heatmap
andcontourf
work consistently with each other, with the same arguments when possible.Colorbar
is plotted, make the appearance of extending triangles on either side automatically determined by default, based on whether the data itself extends beyond the selected colorbar range or not.Note: this is somewhat related to Issue #1737.
To illustrate this issue, the following tests can be used: