I have a spatial data graph that I show with imshow ().
I need to be able to overlay the crystal lattice that created the data. I have a lattice png file that loads as a black and white image. Parts of this image I want to overlay - black lines that are a grid and do not see a white background between the lines.
I think I need to set the alpha for each background (white) to transparent (0?).
I am so new to this that I really don't know how to ask this question.
EDIT:
import matplotlib.pyplot as plt import numpy as np lattice = plt.imread('path') im = plt.imshow(data[0,:,:],vmin=v_min,vmax=v_max,extent=(0,32,0,32),interpolation='nearest',cmap='jet') im2 = plt.imshow(lattice,extent=(0,32,0,32),cmap='gray')

source share