See around and

Where the issues tend to show up is if you have enough dynamic range that the small end is less than difference between adjacent representable numbers at the high end e.g.

In [5]: 1e16 == (1e16 + 1)
Out[5]: True

In some cases the scaling / unscaling does not work out the way you wish it would.  While it is possible that the issues we are having are related to what we are doing with the results, forcing to [0, 1] restricts you to ~15 orders of magnitude on the whole image which seems not ideal.  While it may not be common, that Matplotlib got those bug reports says we do have users with such extreme dynamic range in the community!

That said, if you see any obvious things Matplotlib is doing wrong please let us know!


On Fri, Jul 23, 2021 at 7:42 PM Stefan van der Walt <> wrote:
Hi Tom,

On Fri, Jul 23, 2021, at 14:08, Thomas Caswell wrote:
I would caution about restricting to the [0, 1] range in the functions.  Internal to imshow in Matplotilb we are currently doing this rescaling (because we are using Agg to do some resampling for us) and it has caused a fair amount of trouble, particularly in images with large dynamic range.

I was trying to come up with a case where this would cause problems.  Do you happen to have examples?

Best regards,

scikit-image mailing list --
To unsubscribe send an email to
Member address:

Thomas Caswell