daplis_rtp.gui.canvas.mzi module
Two pixels’ photon rate against time, on a shared pair of y-axes.
The two arms of a Mach-Zehnder interferometer land on two pixels, and what is being watched is how their counts move against each other. Both axes therefore always carry the same limits: two traces on independently scaled axes cross wherever they like and say nothing.
The trace is kept here as three arrays and redrawn whole. The old canvas
instead added a fresh two-point line segment on every refresh, which
meant an hour’s run ended as some thousands of Line2D objects that
matplotlib walked on every draw - and meant there was no record of the
trace to redraw, so a change of colour could only apply to the points
that came after it.