[SciPy-User] Problem of 'rotated' data from mat-file when plotted
O.Zolotov
zolotovo at gmail.com
Fri Mar 23 12:24:58 EDT 2018
Dear All,
I try to ‘plot’ data from mat-file. The matlab file’s URL is
https://agupubs.onlinelibrary.wiley.com/action/downloadSupplement?doi=10.1002%2F2016JA023579&attachmentId=2190682395
(~80Mb!)
When I plot the figure, it looks rotated over the original one. Is
there a way to fix this? I tested it using SciLab also, and it
produced the figure as expected, so the problem is unlikely in the
file itself. I use the following commands to plot the figure
import scipy.io as s
import numpy as np
ds2 = s.loadmat(r"jgra53413-sup-0003-DataSetS2.mat")
jx2, jy2, jz2 = ds2['jx'], ds2['jy'], ds2['jz']
x2, y2, z2 = ds2['x'][0], ds2['y'][0], ds2['z'][0]
X2, Y2 = np.meshgrid(x2,y2)
import matplotlib.pyplot as plt
plt.subplot(2,2,1)
plt.pcolor(X2, Y2, jz2[:,:,0])
plt.colorbar()
plt.show()
The original and plotted images are attached.
Regards,
Oleg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: original.png
Type: image/png
Size: 33626 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20180323/cee3c4f9/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rotated(unexpectedly).png
Type: image/png
Size: 5076 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/scipy-user/attachments/20180323/cee3c4f9/attachment-0003.png>
More information about the SciPy-User
mailing list