diff --git a/artiq/applets/plot_xy.py b/artiq/applets/plot_xy.py index 413d90cb2..6502a004d 100755 --- a/artiq/applets/plot_xy.py +++ b/artiq/applets/plot_xy.py @@ -45,7 +45,8 @@ class XYPlot(pyqtgraph.PlotWidget): errbars = pg.ErrorBarItem(x=np.array(x), y=np.array(y), height=error) self.addItem(errbars) if fit is not None: - self.plot(x, fit) + xi = np.argsort(x) + self.plot(x[xi], fit[xi]) def main():