Skip to content

Commit

Permalink
sort the chopper open and close times when plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
nvaytet committed Oct 10, 2024
1 parent 6c50516 commit a00b124
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 a00b124

Please sign in to comment.