Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python
- coef = 1
- height = 50*coef
- h = 0.5/height
- from matplotlib import pyplot
- import numpy
- from sys import stdin
- data = numpy.loadtxt("data.txt")
- answer = numpy.loadtxt("check.txt")
- x = numpy.arange(0.5, 50, 1)*h
- pyplot.pcolormesh(x,x, data)
- pyplot.xlabel("x")
- pyplot.ylabel("y")
- pyplot.colorbar()
- pyplot.show()
- for s in numpy.array([10, 20, 30, 40])*coef:
- pyplot.plot(x, data[s], label="X slice at {}".format(s*h))
- pyplot.plot(x, data[:,s], label="Y slice at {}".format(s*h))
- pyplot.xlabel("x/y")
- pyplot.ylabel("T")
- pyplot.legend()
- pyplot.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement