1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import os import matplotlib.pyplot as plt import numpy as np os.chdir('/home/vg/Downloads/projects/ex6') os.getcwd() x = np.arange(-5,5,0.1) y = np.arange(-5,5,0.1) u,v = np.meshgrid(x,y) z = 2*u**2 + v**2 - u*v + 10*u plt.contour(x,y,z,50) plt.title('A contour map') plt.savefig("example6.png", dpi=150) plt.show() plt.close() <img class=" size-full wp-image-56 aligncenter" src="https://gantovnik.com/bio-tips/wp-content/uploads/2018/12/example6-1.png" alt="example6" width="600" height="400" /> |
Recent Comments