Skip to content

Commit aca1353

Browse files
committed
Line cross section: fixed X coordinates
1 parent 1c4f67d commit aca1353

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

plotpy/panels/csection/csitem.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ def compute_line_section(
476476
line[0, :] = np.linspace(row0, row1, line.shape[1])
477477
line[1, :] = np.linspace(col0, col1, line.shape[1])
478478
# Interpolate the line
479-
return line[1, :], np.array([data[int(r), int(c)] for r, c in line.T])
479+
y = np.array([data[int(r), int(c)] for r, c in line.T])
480+
x = np.arange(y.size)
481+
return x, y
480482

481483

482484
# Line cross section item

0 commit comments

Comments
 (0)