Skip to content

Commit 8ddfaa8

Browse files
author
Weiwei Wang
committed
fix the plot function in help.py
1 parent b5a261e commit 8ddfaa8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fidimag/common/helper.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,13 @@ def plot_m(mesh, npy, comp='x', based=None):
130130
if based is not None:
131131
data = data - based
132132

133-
data.shape = (3, -1)
134-
m = data[cmpi]
133+
data.shape = (-1, 3)
134+
m = data[:,cmpi]
135135

136136
nx = mesh.nx
137137
ny = mesh.ny
138138

139-
m.shape = (nx, ny)
139+
m.shape = (ny, nx)
140140

141141
fig = plt.figure()
142142
# norm=color.Normalize(-1,1)

0 commit comments

Comments
 (0)