From ca24e00400cba1d1c580a3bf7c3fe671e63a277c Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Fri, 8 Apr 2016 01:17:22 +0800 Subject: [PATCH] plot_xy: un-randomize the fit plot --- artiq/applets/plot_xy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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():