I've been trying to make a contour plot for varying epsilon_1 and epsilon_2 having energy gain as the contour part but I'm not sure how to code it as I keep getting errors when I try anything with
epsilon_1= np.linspace(1,25,1000)
epsilon_2= np.linspace(1,25,1000)
E=1/2*((epsilon_1)/(epsilon_2)+1)
can anyone tell me how to code this properly to get a contour plot of this please?
I tried plt.contour and plt.tricontourf but they didnt work because my E isnt 2D.
You use numpy.meshgrid to turn them into 2d.
You can use contourf instead of contour if you want filled, rather than line, contours.