From 3e6a8a20c30823d2e531ac302823b14498122a26 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 1df60cb97..a176c80bc 100755 --- a/artiq/applets/plot_xy.py +++ b/artiq/applets/plot_xy.py @@ -46,7 +46,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():