Closed
Description
Since 2.1 the effective color resolution of imshow(x, vmin=-1, vmax=1)
seems to depend on large outliers in x
.
Is this intended behavior?
Thanks for clarification!
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
x = np.linspace(-1, 1, 500 )
x = np.ones([20, 1]) * x[np.newaxis, :]
x1 = x.copy()
x1[0, 0] = 1e16
x2 = x.copy()
x2[0, 0] = 1e17
_, axes = plt.subplots(nrows=3)
axes[0].imshow(x, vmin=-1, vmax=1)
axes[1].imshow(x1, vmin=-1, vmax=1)
axes[2].imshow(x2, vmin=-1, vmax=1)
axes[0].set_title(mpl.__version__)
plt.show()
Matplotlib version
- Operating system: Linux
- Matplotlib version: 2.1.0 (expected behavior in 2.0.2)
- Matplotlib backend: Qt5Agg
- Python version: 3.6.4
- Other libraries: numpy 1.13.3
- via conda