Use v{min,max}
for enforcing matplotlib colormap
If it proceeds linearly to *covers the complete value range of the supplied data* then doing so is unnecessary and even if it is another not very different scale transformation then it is still fine for my goal.
This commit is contained in:
@@ -5,10 +5,11 @@ from matplotlib import pyplot as plt
|
||||
def randomGaussianImage(scale, size):
|
||||
return np.random.normal(loc = 0, scale = scale, size = size)
|
||||
|
||||
def showImageWithMatplotlib(npArray, title = None):
|
||||
# `cmap` source: https://matplotlib.org/3.8.0/api/_as_gen/matplotlib.pyplot.imshow.html
|
||||
def showImageWithMatplotlib(npArray, title = None, cmap = 'viridis'):
|
||||
if title is not None:
|
||||
plt.title(title)
|
||||
plt.imshow(npArray)
|
||||
plt.imshow(npArray, cmap = cmap)
|
||||
plt.show()
|
||||
|
||||
def toPilImage(npArray):
|
||||
|
Reference in New Issue
Block a user