The plt.imshow
function does not allow me to overlay two images with a white background. First I masked a region of interest for two different images. Then I tried to overlay the two regions of interest in one image with a white background.
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot')
plt.figure(figsize = (5,5))
plt.imshow(img1,vmin=4,vmax=25,cmap='Blues', alpha=0.4)
plt.imshow(img2, cmap='Reds',vmin=4,vmax=25, alpha=0.4)
I used the ‘ggplot’ style, but it did not work. Below are the output image and expected images.
Output image:
Expected image:
I tried the function plt.plot
, but it plots it in a messy way.
3