It depends on how you compare outputs. When using Matplotlib for example, you should get a min/max normalized output per default. Let's see the following example:
from matplotlib import pyplot as plt
import numpy as np
plt.figure(1, figsize=(12, 5))
# Original data/image
IMG = np.genfromtxt('test.csv', delimiter=',')
plt.subplot(1, 2, 1), plt.imshow(IMG), plt.colorbar()
# Min/max normalized data/image
IMG = IMG - np.min(IMG)
IMG = IMG / np.max(IMG)
plt.subplot(1, 2, 2), plt.imshow(IMG), plt.colorbar()
plt.tight_layout()
plt.show()
That'd be the output:

As you can see, the default output of Matplotlib (left) as well as the output of the explicitly min/max normalized data/image (right) are equal.
Apart from that, the presented min/max normalization should be, what you're looking for.
Hope that helps!
-----------------------
System information
-----------------------
Python: 3.8.1
Matplotlib: 3.2.0rc1
NumPy: 1.18.1
-----------------------
EDIT: After clarification in the comment, I guess using the vmin
and vmax
parameters in Matplotlib's imshow
might be the simplest way to go:
from matplotlib import pyplot as plt
import numpy as np
def plot_scaled(data, min_scale, max_scale):
plt.imshow(data, vmin=min_scale, vmax=max_scale), plt.colorbar()
# Original data/image
IMG = np.genfromtxt('test.csv', delimiter=',')
# Artificial data
IMG_large = IMG + 10
IMG_even_larger = IMG + 100
plt.figure(1, figsize=(15, 4))
for i, img in enumerate([IMG, IMG_large, IMG_even_larger]):
plt.subplot(1, 3, i+1), plot_scaled(img, 0, 200)
plt.tight_layout()
plt.show()

Value 100 has the same color in all three plots.