Advertisement
Guest User

Untitled

a guest
May 5th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import numpy
  2. import matplotlib.pyplot as plt
  3.  
  4. f = lambda x, y: numpy.exp(x*y)-x**2+y-1.4
  5. xr = numpy.linspace(-2, 2, 100)
  6. yr = numpy.linspace(-2, 2, 100)
  7. X, Y = numpy.meshgrid(xr, yr)
  8. Z = f(X, Y)
  9. plt.contourf(xr, yr, Z, levels=numpy.linspace(-0.01, 0.01, 50), alpha=0.5)
  10. plt.colorbar()
  11. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement