Problem of 'rotated' data from mat-file when plotted
"O.Zolotov" <[email protected]>
| Newsgroups | gmane.comp.python.scientific.user |
|---|---|
| Message-ID | <CACstmXR86S5GrjrWFbdHR3CFHw7KJcXYw4oc7bn9PeQT6A-idQ@mail.gmail.com> |
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 _______________________________________________ SciPy-User mailing list [email protected] https://mail.python.org/mailman/listinfo/scipy-user
original.png
(image/png, 32.8 KB) - not displayed
rotated(unexpectedly).png
(image/png, 5 KB) - not displayed