You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MNT: also transform vmin/vmax when rendering imshow
We use the Agg resampling routines to resample the user supplied data
to the number of pixels we need in the final rendering. The Agg
routines require that the input be in the range [0, 1] and it
aggressively clips input and output to that range. Thus, we rescale
the user data to [0, 1], pass it to the resampling routine and then
rescale the result back to the original range. The resampled (shape
wise) data is than passed to the user supplied norm to normalize the
data to [0, 1] (again), and then onto the color map to get to RBGA.
Due to float precision, the first re-scaling does not round-trip
exactly in all casses. The error is extremely small (8-16 orders of
magnitude smaller than the data) but for values that are exactly equal
to the user supplied vmin or vmax this can be enough to push the data
out of the "valid" gamut and be marked as "over" or "under". The
colormaps default to using the top/bottom color for the over/under
color so this is not visible, however if the user sets the over/under
colors of the cmap this issue will be visible.
closes#16910
0 commit comments