problem with colormap in imshow with fixed vmin, vmax
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 316
- Avg merge
- 7h 44m
- Merged PRs (30d)
- 5
Description
Hello,
My problem is illustrated with the simplified test case below
```
import numpy as np
import mayavi.mlab as plt_mayavi
# 3 stripes case : 1, 0, -1 (red, green, blue)
Z3 = np.ones((10, 10))
Z3[5:7, :] = 0
Z3[7:, :] = -1
plt_mayavi.imshow(Z3, vmin=-1, vmax=1)
plt_mayavi.show()
# 2 stripes case : 1, 0 (red, green)
Z2 = np.ones((10, 10))
Z2[5:, :] = 0
plt_mayavi.imshow(Z2, vmin=-1, vmax=1)
plt_mayavi.show()
```
fixing vmin and vmax in imshow(), I wish the 2 stripes case plotting (Z2) returns red and green colors (associated to +1 and 0 values respectively) in order to be coherent with Z3 plotting, and not red and blue stripes.
How to fix this ? Any idea ?
Patrick
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.