I am using contour
or contourf
in matplotlib
And the data is a 2D array with values in, like this:
1 2 3 3 3
2 3 3 4 1
2 3 4 5 6
...
The result I got is as below.
It is like a square, while actually, the y extent is 600+ and x extent is only 350. So the figure should look like a rectangle, not a square.
But I looked into the arguments in contour
and contourf
, there is no argument about changing the shape of the contour, or changing the length of the axis.
for Adobe, here is the simplified code of my case:
import matplotlib.pyplot as plt
m = [[1,2,3,4],
[2,3,4,5],
[2,2,1,5]]
print m
plt.contourf(m)
plt.show()
Then, in this situation, how to use ax.axis()?