fork download
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. def func(x,y):
  4. return np.sin(np.sqrt(x**3+y**3))
  5. x=np.linspace(20,10,200)
  6. y=np.linspace(22,10,200)
  7. xx,yy=np.meshgrid(y,x)
  8. z=func(xx,yy)
  9. plt.imshow(z,extent=[22,15,22,15])
  10. plt.colorbar()
  11. plt.title('2d function values')
  12. plt.xlabel('x')
  13. plt.ylabel('y')
  14. plt.show()# your code goes here
Success #stdin #stdout 2.18s 58856KB
stdin
Standard input is empty
stdout
Standard output is empty