Skip to content

Commit

Permalink
Merge pull request #58 from scipp/sort-chopper-times-in-plot
Browse files Browse the repository at this point in the history
Sort the chopper open and close times when plotting
  • Loading branch information
nvaytet authored Oct 10, 2024
2 parents 60ffd1d + 1b85b24 commit 6922879
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tof/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ def plot(
)
y = np.full_like(x, ch.distance.value)
y[2::3] = None
ax.plot(x, y, color="k")
inds = np.argsort(x)
ax.plot(x[inds], y[inds], color="k")
ax.text(
tof_max, ch.distance.value, ch.name, ha="right", va="bottom", color="k"
)
Expand Down

0 comments on commit 6922879

Please sign in to comment.