Advertisement
Guest User

Untitled

a guest
Mar 24th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/python
  2. coef = 1
  3. height = 50*coef
  4. h = 0.5/height
  5. from matplotlib import pyplot
  6. import numpy
  7. from sys import stdin
  8. data = numpy.loadtxt("data.txt")
  9. answer = numpy.loadtxt("check.txt")
  10. x = numpy.arange(0.5, 50, 1)*h
  11. pyplot.pcolormesh(x,x, data)
  12. pyplot.xlabel("x")
  13. pyplot.ylabel("y")
  14. pyplot.colorbar()
  15. pyplot.show()
  16. for s in numpy.array([10, 20, 30, 40])*coef:
  17. pyplot.plot(x, data[s], label="X slice at {}".format(s*h))
  18. pyplot.plot(x, data[:,s], label="Y slice at {}".format(s*h))
  19. pyplot.xlabel("x/y")
  20. pyplot.ylabel("T")
  21. pyplot.legend()
  22. pyplot.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement