From 4432a99bb931d166fb62750413394385db537716 Mon Sep 17 00:00:00 2001 From: butlerpd Date: Sat, 25 Feb 2023 22:50:08 +0000 Subject: [PATCH] Add +/- 1 adn 3 sigma lines on residual plots Residual plots should now have 2 red lines at +/- 3 sigma and 2 dashed gray lines at +/-1 sigma. There does not seem to be any documentation that needs updating. --- src/sas/qtgui/Plotting/Plotter.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/sas/qtgui/Plotting/Plotter.py b/src/sas/qtgui/Plotting/Plotter.py index 2ce4908339..d28e3077a1 100644 --- a/src/sas/qtgui/Plotting/Plotter.py +++ b/src/sas/qtgui/Plotting/Plotter.py @@ -227,6 +227,12 @@ def plot(self, data=None, color=None, marker=None, hide_error=False, transform=T if data.show_yzero: ax.axhline(color='black', linewidth=1) + # Display +/- 3 sigma and +/- 1 sigma lines for residual plots + if data.plot_role == data.ROLE_RESIDUAL: + ax.axhline(y=3, color='red', linestyle='-') + ax.axhline(y=-3, color='red', linestyle='-') + ax.axhline(y=1, color='gray', linestyle='--') + ax.axhline(y=-1, color='gray', linestyle='--') # Update the list of data sets (plots) in chart self.plot_dict[data.name] = data