Index: src/sas/sasgui/guiframe/gui_manager.py
===================================================================
--- src/sas/sasgui/guiframe/gui_manager.py	(revision 9220e89c31ca5156d9c3a40634b4257084d139a2)
+++ src/sas/sasgui/guiframe/gui_manager.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -282,5 +282,5 @@
         toolbar = self.GetToolBar()
         if toolbar is not None:
-            _, tb_h = toolbar.GetSizeTuple()
+            _, tb_h = toolbar.GetSize()
             height -= tb_h
         return width, height
@@ -948,5 +948,5 @@
                 if panel_class.CENTER_PANE:
                     self.panels[str(wx_id)] = panel_class
-                    _, pos_y = frame.GetPositionTuple()
+                    _, pos_y = frame.GetPosition()
                     frame.SetPosition((d_panel_width + 1, pos_y))
                     frame.SetSize((w, h))
@@ -1116,5 +1116,5 @@
         if not IS_WIN:
             p.frame.Center()
-            x_pos, _ = p.frame.GetPositionTuple()
+            x_pos, _ = p.frame.GetPosition()
             p.frame.SetPosition((x_pos, 112))
         p.frame.Show(True)
@@ -3011,5 +3011,5 @@
         if self.GetToolBar() is not None and self.GetToolBar().IsShown():
             if not IS_LINUX:
-                _, size_y = self.GetToolBar().GetSizeTuple()
+                _, size_y = self.GetToolBar().GetSize()
         return size_y
 
@@ -3130,5 +3130,5 @@
         :rtype: tuple
         """
-        width, height = self.GetSizeTuple()
+        width, height = self.GetSize()
         if not IS_WIN:
             # Subtract toolbar height to get real window side
Index: src/sas/sasgui/guiframe/gui_statusbar.py
===================================================================
--- src/sas/sasgui/guiframe/gui_statusbar.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/gui_statusbar.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -112,5 +112,5 @@
         Method to send an arbitrary number of messages to the console log
 
-        :param messages: A list of strings to be sent to the console log. 
+        :param messages: A list of strings to be sent to the console log.
         """
         if messages:
@@ -234,5 +234,5 @@
         If the window is resized, redraw the window.
         """
-        self.reposition() 
+        self.reposition()
         self.size_changed = True
 
@@ -360,5 +360,5 @@
         if hasattr(event, "status"):
             self.SetStatusText(text=str(event.status), event=event)
-  
+
     def set_gauge(self, event):
         """
@@ -423,5 +423,5 @@
         self.SetFieldsCount(1)
         self.timeout = timeout
-        width, height = parent.GetSizeTuple()
+        width, height = parent.GetSize()
         self.gauge = wx.Gauge(self, style=wx.GA_HORIZONTAL,
                               size=(width, height/10))
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/AnnulusSlicer.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -161,10 +161,10 @@
         new_plot.detector = self.base.data2D.detector
         # If the data file does not tell us what the axes are, just assume...
-        new_plot.xaxis("\\rm{\phi}", 'degrees')
-        new_plot.yaxis("\\rm{Intensity} ", "cm^{-1}")
-        if hasattr(data, "scale") and data.scale == 'linear' and \
-                self.base.data2D.name.count("Residuals") > 0:
+        new_plot.xaxis(r"\rm{\phi}", 'degrees')
+        new_plot.yaxis(r"\rm{Intensity} ", "cm^{-1}")
+        if (hasattr(data, "scale") and data.scale == 'linear'
+                and self.base.data2D.name.count("Residuals") > 0):
             new_plot.ytransform = 'y'
-            new_plot.yaxis("\\rm{Residuals} ", "/")
+            new_plot.yaxis(r"\rm{Residuals} ", "/")
 
         new_plot.group_id = "AnnulusPhi" + self.base.data2D.name
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -205,7 +205,7 @@
         self.canvas.set_resizing(self.resizing)
         self.parent.set_schedule(True)
-        pos_x, pos_y = self.GetPositionTuple()
+        pos_x, pos_y = self.GetPosition()
         if pos_x != 0 and pos_y != 0:
-            self.size, _ = self.GetClientSizeTuple()
+            self.size, _ = self.GetClientSize()
         self.SetSizer(self.sizer)
         wx.CallAfter(self.parent.disable_app_menu, self)
@@ -714,5 +714,5 @@
             pos = self.ScreenToClient(pos_evt)
         except:
-            pos_x, pos_y = self.toolbar.GetPositionTuple()
+            pos_x, pos_y = self.toolbar.GetPosition()
             pos = (pos_x, pos_y + 5)
         self.PopupMenu(self._slicerpop, pos)
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter2D.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -179,6 +179,6 @@
         # On Windows platform, default window size is incorrect, so set
         # toolbar width to figure width.
-        _, th = self.toolbar.GetSizeTuple()
-        fw, _ = self.canvas.GetSizeTuple()
+        _, th = self.toolbar.GetSize()
+        fw, _ = self.canvas.GetSize()
         self.toolbar.SetSize(wx.Size(fw, th))
         self.sizer.Add(self.toolbar, 0, wx.LEFT | wx.EXPAND)
@@ -400,5 +400,5 @@
             pos = self.ScreenToClient(pos_evt)
         except:
-            pos_x, pos_y = self.toolbar.GetPositionTuple()
+            pos_x, pos_y = self.toolbar.GetPosition()
             pos = (pos_x, pos_y + 5)
         self.PopupMenu(slicerpop, pos)
Index: src/sas/sasgui/guiframe/local_perspectives/plotting/SimplePlot.py
===================================================================
--- src/sas/sasgui/guiframe/local_perspectives/plotting/SimplePlot.py	(revision 7432acb919f4013119ca918a73350297e0d4c93f)
+++ src/sas/sasgui/guiframe/local_perspectives/plotting/SimplePlot.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -84,5 +84,5 @@
             pos = self.ScreenToClient(pos_evt)
         except:
-            pos_x, pos_y = self.toolbar.GetPositionTuple()
+            pos_x, pos_y = self.toolbar.GetPosition()
             pos = (pos_x, pos_y + 5)
         self.PopupMenu(slicerpop, pos)
@@ -135,7 +135,7 @@
         # set the resizing flag
         self.canvas.set_resizing(self.resizing)
-        pos_x, pos_y = self.GetPositionTuple()
+        pos_x, pos_y = self.GetPosition()
         if pos_x != 0 and pos_y != 0:
-            self.size, _ = self.GetClientSizeTuple()
+            self.size, _ = self.GetClientSize()
         self.SetSizer(self.sizer)
 
Index: src/sas/sasgui/guiframe/plugin_base.py
===================================================================
--- src/sas/sasgui/guiframe/plugin_base.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/plugin_base.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -105,5 +105,5 @@
     def delete_data(self, data_id):
         """
-        Delete all references of data which id are in data_list. 
+        Delete all references of data which id are in data_list.
         """
 
@@ -142,5 +142,5 @@
         """
         Create and return the list of application menu
-        items for the plug-in. 
+        items for the plug-in.
 
         :param parent: parent window
@@ -238,5 +238,5 @@
         if self.frame is not None:
             if old_frame is not None:
-                pos_x, pos_y = old_frame.GetPositionTuple()
+                pos_x, pos_y = old_frame.GetPosition()
                 self.frame.SetPosition((pos_x, pos_y))
             if not self.frame.IsShown():
@@ -254,5 +254,5 @@
         need to be overwritten by the derivated class
         """
-    
+
     def post_init(self):
         """
@@ -261,5 +261,5 @@
         pass
 
-    def set_state(self, state=None, datainfo=None):    
+    def set_state(self, state=None, datainfo=None):
         """
         update state
Index: src/sas/sasgui/guiframe/startup_configuration.py
===================================================================
--- src/sas/sasgui/guiframe/startup_configuration.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/guiframe/startup_configuration.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -127,5 +127,5 @@
             for panel in self.parent.plot_panels.values():
                 #p_panel = self.parent._mgr.GetPane(panel.window_name)
-                width, _ = panel.frame.GetSizeTuple()
+                width, _ = panel.frame.GetSize()
                 if panel.frame.IsShown():
                     if p_size is None or width > p_size:
@@ -137,5 +137,5 @@
             try:
                 control_frame = self.parent.get_current_perspective().frame
-                control_w, control_h = control_frame.GetSizeTuple()
+                control_w, control_h = control_frame.GetSize()
                 self.current_string['CONTROL_WIDTH'] = control_w
                 self.current_string['CONTROL_HEIGHT'] = control_h
@@ -144,5 +144,5 @@
                 self.current_string['CONTROL_HEIGHT'] = -1
 
-            data_pw, _ = self.parent.panels["data_panel"].frame.GetSizeTuple()
+            data_pw, _ = self.parent.panels["data_panel"].frame.GetSize()
             if data_pw is None:
                 data_pw = CURRENT_STRINGS['DATAPANEL_WIDTH']
Index: src/sas/sasgui/perspectives/calculator/data_operator.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/data_operator.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/perspectives/calculator/data_operator.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -866,5 +866,5 @@
         except:
             # toolbar event
-            pos_x, pos_y = self.toolbar.GetPositionTuple()
+            pos_x, pos_y = self.toolbar.GetPosition()
             pos = (pos_x, pos_y + 5)
         self.PopupMenu(slicerpop, pos)
Index: src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/perspectives/calculator/gen_scatter_panel.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -43,5 +43,5 @@
 
 _BOX_WIDTH = 76
-#Slit length panel size 
+#Slit length panel size
 if sys.platform.count("win32") > 0:
     PANEL_TOP = 0
@@ -133,8 +133,8 @@
         #kwds['style'] = wx.SUNKEN_BORDER
         PanelBase.__init__(self)
-        #Font size 
+        #Font size
         self.SetWindowVariant(variant=FONT_VARIANT)
         self.SetupScrolling()
-        #thread to read data 
+        #thread to read data
         self.reader = None
         self.ext = None
@@ -218,20 +218,20 @@
         iy = 0
         param_title = wx.StaticText(self, -1, 'Parameter')
-        sizer.Add(param_title, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(param_title, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
         value_title = wx.StaticText(self, -1, 'Value')
-        sizer.Add(value_title, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(value_title, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ix += 1
         unit_title = wx.StaticText(self, -1, 'Unit')
-        sizer.Add(unit_title, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(unit_title, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         for param in sorted(params.keys()):
             iy += 1
             ix = 0
             p_name = wx.StaticText(self, -1, param)
-            sizer.Add(p_name, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(p_name, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             ## add parameter value
             ix += 1
@@ -239,5 +239,5 @@
             ctl = InputTextCtrl(self, -1, size=(_BOX_WIDTH * 2, 20),
                                 style=wx.TE_PROCESS_ENTER)
-            #ctl.SetToolTipString(\
+            #ctl.SetToolTipString(
             #            "Hit 'Enter' after typing to update the plot.")
             ctl.SetValue(format_number(value, True))
@@ -246,6 +246,6 @@
             ix += 1
             unit = wx.StaticText(self, -1, details[param][0])
-            sizer.Add(unit, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(unit, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             self.parameters.append([p_name, ctl, unit])
 
@@ -340,10 +340,10 @@
         iy = 0
         name = wx.StaticText(self, -1, 'No. of Qx (Qy) bins: ')
-        sizer.Add(name, (iy, ix), (1, 1), \
-                        wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(name, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ## add parameter value
         ix += 1
         self.npt_ctl = InputTextCtrl(self, -1, size=(_BOX_WIDTH * 1.5, 20),
-                            style=wx.TE_PROCESS_ENTER)
+                                     style=wx.TE_PROCESS_ENTER)
         self.npt_ctl.Bind(wx.EVT_TEXT, self._onparamEnter)
         self.npt_ctl.SetValue(format_number(self.npts_x, True))
@@ -352,11 +352,11 @@
         ix += 1
         unit = wx.StaticText(self, -1, '')
-        sizer.Add(unit, (iy, ix), (1, 1), \
-                        wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(unit, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         iy += 1
         ix = 0
         name = wx.StaticText(self, -1, 'Qx (Qy) Max: ')
-        sizer.Add(name, (iy, ix), (1, 1), \
-                        wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(name, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         ## add parameter value
         ix += 1
@@ -369,6 +369,6 @@
         ix += 1
         unit = wx.StaticText(self, -1, '[1/A]')
-        sizer.Add(unit, (iy, ix), (1, 1), \
-                        wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+        sizer.Add(unit, (iy, ix), (1, 1),
+                  wx.EXPAND | wx.ADJUST_MINSIZE, 0)
         self.qrange_sizer.Add(sizer, 0, wx.LEFT, 10)
 
@@ -684,5 +684,5 @@
         self.sld_data = self.parent.get_sld_from_omf()
         output = self.sld_data
-        #frame_size = wx.Size(470, 470)    
+        #frame_size = wx.Size(470, 470)
         self.plot_frame = PlotFrame(self, -1, 'testView')
         frame = self.plot_frame
@@ -703,9 +703,11 @@
         panel.dimension = 3
         graph_title = self._sld_plot_helper(ax, output, has_arrow)
-        # Use y, z axes (in mpl 3d) as z, y axes 
+        # Use y, z axes (in mpl 3d) as z, y axes
         # that consistent with our SAS detector coords.
-        ax.set_xlabel('x ($\A%s$)' % output.pos_unit)
-        ax.set_ylabel('z ($\A%s$)' % output.pos_unit)
-        ax.set_zlabel('y ($\A%s$)' % output.pos_unit)
+        # Format Angstrom units (A) as latex $\AA$
+        units = output.pos_unit if output.pos_unit != "A" else r"$\AA$"
+        ax.set_xlabel('x (%s)' % units)
+        ax.set_ylabel('z (%s)' % units)
+        ax.set_zlabel('y (%s)' % units)
         panel.subplot.figure.subplots_adjust(left=0.05, right=0.95,
                                              bottom=0.05, top=0.96)
@@ -741,6 +743,6 @@
             marker = 'o'
             m_size = 3.5
-        sld_tot = (np.fabs(sld_mx) + np.fabs(sld_my) + \
-                   np.fabs(sld_mz) + np.fabs(output.sld_n))
+        sld_tot = (np.fabs(sld_mx) + np.fabs(sld_my)
+                   + np.fabs(sld_mz) + np.fabs(output.sld_n))
         is_nonzero = sld_tot > 0.0
         is_zero = sld_tot == 0.0
@@ -766,5 +768,5 @@
                         pos_y[chosen_color], marker, c=color, alpha=0.5,
                         markeredgecolor=color, markersize=m_size, label=key)
-        # III. Plot All others        
+        # III. Plot All others
         if np.any(other_color):
             a_name = ''
@@ -1028,6 +1030,6 @@
         self.data = Data2D()
         qmax = self.qmax_x #/ np.sqrt(2)
-        self.data.xaxis('\\rm{Q_{x}}', '\AA^{-1}')
-        self.data.yaxis('\\rm{Q_{y}}', '\AA^{-1}')
+        self.data.xaxis(r'\rm{Q_{x}}', r'\AA^{-1}')
+        self.data.yaxis(r'\rm{Q_{y}}', r'\AA^{-1}')
         self.data.is_data = False
         self.data.id = str(self.uid) + " GenData"
@@ -1120,6 +1122,6 @@
         new_plot.dx = data.dx
         new_plot.dy = data.dy
-        new_plot.xaxis('\\rm{Q_{x}}', '\AA^{-1}')
-        new_plot.yaxis('\\rm{Intensity}', 'cm^{-1}')
+        new_plot.xaxis(r'\rm{Q_{x}}', r'\AA^{-1}')
+        new_plot.yaxis(r'\rm{Intensity}', 'cm^{-1}')
         new_plot.is_data = False
         new_plot.id = str(self.uid) + " GenData1D"
@@ -1127,8 +1129,8 @@
         new_plot.name = model.name + '1d'
         new_plot.title = "Generic model1D "
-        new_plot.id = str(page_id) + ': ' + self.file_name \
-                        + ' #%s' % str(self.graph_num) + "_1D"
-        new_plot.group_id = str(page_id) + " Model1D" + \
-                             ' #%s' % str(self.graph_num) + "_1D"
+        new_plot.id = (str(page_id) + ': ' + self.file_name
+                       + ' #%s' % str(self.graph_num) + "_1D")
+        new_plot.group_id = (str(page_id) + " Model1D"
+                             + ' #%s' % str(self.graph_num) + "_1D")
         new_plot.is_data = False
 
@@ -1175,8 +1177,8 @@
         new_plot.name = model.name + '2d'
         new_plot.title = "Generic model 2D "
-        new_plot.id = str(page_id) + ': ' + self.file_name \
-                        + ' #%s' % str(self.graph_num) + "_2D"
-        new_plot.group_id = str(page_id) + " Model2D" \
-                        + ' #%s' % str(self.graph_num) + "_2D"
+        new_plot.id = (str(page_id) + ': ' + self.file_name
+                       + ' #%s' % str(self.graph_num) + "_2D")
+        new_plot.group_id = (str(page_id) + " Model2D"
+                             + ' #%s' % str(self.graph_num) + "_2D")
         new_plot.detector = data.detector
         new_plot.source = data.source
@@ -1243,5 +1245,5 @@
                                *args, **kwds)
         PanelBase.__init__(self)
-        #Font size 
+        #Font size
         self.SetWindowVariant(variant=FONT_VARIANT)
         self.SetupScrolling()
@@ -1446,6 +1448,6 @@
             ix = 0
             name = wx.StaticText(self, -1, key)
-            sizer.Add(name, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(name, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             ## add parameter value
             ix += 1
@@ -1459,6 +1461,6 @@
             s_unit = '[' + omfdata.sld_unit + ']'
             unit = wx.StaticText(self, -1, s_unit)
-            sizer.Add(unit, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(unit, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             self.slds.append([key, ctl, unit])
         self.sld_sizer.Add(sizer, 0, wx.LEFT, 10)
@@ -1481,6 +1483,6 @@
             ix = 0
             name = wx.StaticText(self, -1, key)
-            sizer.Add(name, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(name, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             ## add parameter value
             ix += 1
@@ -1494,6 +1496,6 @@
             ix += 1
             unit = wx.StaticText(self, -1, '')
-            sizer.Add(unit, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(unit, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             self.nodes.append([key, ctl, unit])
         self.node_sizer.Add(sizer, 0, wx.LEFT, 10)
@@ -1516,6 +1518,6 @@
             ix = 0
             name = wx.StaticText(self, -1, key)
-            sizer.Add(name, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(name, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             ## add parameter value
             ix += 1
@@ -1530,6 +1532,6 @@
             p_unit = '[' + omfdata.pos_unit + ']'
             unit = wx.StaticText(self, -1, p_unit)
-            sizer.Add(unit, (iy, ix), (1, 1), \
-                            wx.EXPAND | wx.ADJUST_MINSIZE, 0)
+            sizer.Add(unit, (iy, ix), (1, 1),
+                      wx.EXPAND | wx.ADJUST_MINSIZE, 0)
             self.stepsize.append([key, ctl, unit])
         self.step_sizer.Add(sizer, 0, wx.LEFT, 10)
@@ -1626,5 +1628,5 @@
             for ctr_list in self.slds:
                 ctr_list[1].Enable(False)
-                #break   
+                #break
             return
 
@@ -1637,6 +1639,6 @@
                     max_val = np.max(sld_list[key])
                     mean_val = np.mean(sld_list[key])
-                    enable = (min_val == max_val) and \
-                             sld_data.pix_type == 'pixel'
+                    enable = ((min_val == max_val)
+                              and sld_data.pix_type == 'pixel')
                     ctr_list[1].SetValue(format_number(mean_val, True))
                     ctr_list[1].Enable(enable)
Index: src/sas/sasgui/perspectives/calculator/image_viewer.py
===================================================================
--- src/sas/sasgui/perspectives/calculator/image_viewer.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/perspectives/calculator/image_viewer.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -62,5 +62,5 @@
                 # Any other formats (tiff, jpeg, etc) are passed
                 # to PIL which seems to have a problem in version
-                # 1.1.7 that causes a close error which shows up in 
+                # 1.1.7 that causes a close error which shows up in
                 # the log file.  This does not seem to have any adverse
                 # effects.  PDB   --- September 17, 2017.
@@ -383,5 +383,5 @@
                 print(err_msg)
 
-        self.OnClose(event)
+        self.EndModal(wx.ID_OK)
 
     def convert_image(self, rgb, xmin, xmax, ymin, ymax, zscale):
@@ -417,6 +417,6 @@
         output.ymin = ymin
         output.ymax = ymax
-        output.xaxis('\\rm{Q_{x}}', '\AA^{-1}')
-        output.yaxis('\\rm{Q_{y}}', '\AA^{-1}')
+        output.xaxis(r'\rm{Q_{x}}', r'\AA^{-1}')
+        output.yaxis(r'\rm{Q_{y}}', r'\AA^{-1}')
         # Store loading process information
         output.meta_data['loader'] = self.title.split('.')[-1] + "Reader"
@@ -451,5 +451,6 @@
         # clear event
         event.Skip()
-        self.Destroy()
+        self.EndModal(wx.ID_CANCEL)
+        #self.Destroy()
 
 if __name__ == "__main__":
Index: src/sas/sasgui/perspectives/pr/explore_dialog.py
===================================================================
--- src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/perspectives/pr/explore_dialog.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -50,5 +50,5 @@
     window_caption = "D Explorer"
 
-    def __init__(self, d_min, d_max, parent, id= -1, color=None, \
+    def __init__(self, d_min, d_max, parent, id= -1, color=None,
                  dpi=None, style=wx.NO_FULL_REPAINT_ON_RESIZE, **kwargs):
         """
@@ -77,8 +77,8 @@
         self.plot.symbol = GUIFRAME_ID.CURVE_SYMBOL_NUM
 
-        # Graph        
+        # Graph
         self.graph = Graph()
-        self.graph.xaxis("\\rm{D_{max}}", 'A')
-        self.graph.yaxis("\\rm{%s}" % DEFAULT_OUTPUT, "")
+        self.graph.xaxis(r"\rm{D_{max}}", 'A')
+        self.graph.yaxis(r"\rm{%s}" % DEFAULT_OUTPUT, "")
         self.graph.add(self.plot)
         self.graph.render(self)
@@ -133,8 +133,8 @@
         # Dictionary of outputs
         self.outputs = {}
-        self.outputs['Chi2/dof'] = ["\chi^2/dof", "a.u.", self.chi2]
+        self.outputs['Chi2/dof'] = [r"\chi^2/dof", "a.u.", self.chi2]
         self.outputs['Oscillation parameter'] = ["Osc", "a.u.", self.osc]
         self.outputs['Positive fraction'] = ["P^+", "a.u.", self.pos]
-        self.outputs['1-sigma positive fraction'] = ["P^+_{1\ \sigma}",
+        self.outputs['1-sigma positive fraction'] = [r"P^+_{1\ \sigma}",
                                                      "a.u.", self.pos_err]
         self.outputs['Rg'] = ["R_g", "A", self.rg]
Index: src/sas/sasgui/perspectives/simulation/SimCanvas.py
===================================================================
--- src/sas/sasgui/perspectives/simulation/SimCanvas.py	(revision 959eb0181ad06828a748f04512f953aad5b31659)
+++ src/sas/sasgui/perspectives/simulation/SimCanvas.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -2,5 +2,5 @@
 This software was developed by the University of Tennessee as part of the
 Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-project funded by the US National Science Foundation. 
+project funded by the US National Science Foundation.
 
 See the license text in license.txt
@@ -32,7 +32,7 @@
 except ImportError:
     haveOpenGL = False
-    
+
 # Color set
-DEFAULT_COLOR = [1.0, 1.0, 0.0, .2]    
+DEFAULT_COLOR = [1.0, 1.0, 0.0, .2]
 COLOR_RED     = [1.0, 0.0, 0.0, .2]
 COLOR_GREEN   = [0.0, 1.0, 0.0, .2]
@@ -48,18 +48,18 @@
 class SimPanel(wx.Panel):
     """
-        3D viewer to support real-space simulation. 
+        3D viewer to support real-space simulation.
     """
     window_name = "3dview"
     window_caption = "3D viewer"
-    
+
     def __init__(self, parent, id = -1, plots = None, standalone=False, **kwargs):
         wx.Panel.__init__(self, parent, id = id, **kwargs)
         self.parent = parent
-    
+
         #Add a sizer
         mainSizer = wx.BoxSizer(wx.VERTICAL)
         sliderSizer = wx.BoxSizer(wx.HORIZONTAL)
-    
-        self.canvas    = CanvasBase(self) 
+
+        self.canvas    = CanvasBase(self)
         self.canvas.SetMinSize((200,2100))
 
@@ -72,6 +72,6 @@
         self.SetSizer(mainSizer)
         self.Bind(wx.EVT_CONTEXT_MENU, self._on_context_menu)
-        
- 
+
+
     def _on_context_menu(self, event):
         """
@@ -83,9 +83,9 @@
         slicerpop.Append(id, '&Reset 3D View')
         wx.EVT_MENU(self, id, self.canvas.resetView)
-       
+
         pos = event.GetPosition()
         pos = self.ScreenToClient(pos)
-        self.PopupMenu(slicerpop, pos)        
-    
+        self.PopupMenu(slicerpop, pos)
+
 class CanvasBase(glcanvas.GLCanvas):
     """
@@ -94,5 +94,5 @@
     window_name = "Simulation"
     window_caption = "Simulation"
-    
+
     def __init__(self, parent):
         glcanvas.GLCanvas.__init__(self, parent, -1)
@@ -113,21 +113,21 @@
         self.Bind(wx.EVT_MOTION, self.OnMouseMotion)
         self.Bind(wx.EVT_MOUSEWHEEL, self._onMouseWheel)
-        
+
         self.initialized = False
         self.shapes = []
         self.parent = parent
-        
+
         # Reference vectors
         self.x_vec = [1,0,0]
         self.y_vec = [0,1,0]
-        
+
         self.mouse_down = False
         self.scale = 1.0
         self.zoom  = 1.0
         self.translation = [0,0,0]
-        
+
         # Bind to Edit events
         self.parent.Bind(ShapeParameters.EVT_EDIT_SHAPE, self._onEditShape)
-        
+
     def resetView(self, evt=None):
         """
@@ -140,5 +140,5 @@
         glLoadIdentity()
         self.Refresh()
-                
+
     def _onEditShape(self, evt):
         evt.Skip()
@@ -158,14 +158,14 @@
         event.Skip()
 
-    def OnPaint(self, event):     
+    def OnPaint(self, event):
         size = self.GetClientSize()
         side = size.width
         if size.height<size.width:
             side = size.height
-        
+
         if self.GetContext():
             glViewport(0, 0, side, side)
             self.SetMinSize((side,side))
-            
+
         dc = wx.PaintDC(self)
         self.SetCurrent()
@@ -174,20 +174,20 @@
             self.init = True
         self.OnDraw()
-        event.Skip()        
-        
+        event.Skip()
+
     def _onMouseWheel(self, evt):
         # Initialize mouse position so we don't have unwanted rotation
         self.x, self.y = self.lastx, self.lasty = evt.GetPosition()
         self.tr_x, self.tr_y = self.tr_lastx, self.tr_lasty = evt.GetPosition()
-        
+
         scale = 1.15
         if evt.GetWheelRotation()<0:
             scale = 1.0/scale
-             
-        self.zoom *= scale             
-             
+
+        self.zoom *= scale
+
         glScale(scale, scale, scale)
         self.Refresh(False)
-        
+
     def OnMouseDown(self, evt):
         self.SetFocus()
@@ -214,8 +214,8 @@
         slicerpop.Append(id, '&Reset 3D View')
         wx.EVT_MENU(self, id, self.resetView)
-       
+
         pos = event.GetPosition()
         #pos = self.ScreenToClient(pos)
-        self.PopupMenu(slicerpop, pos)        
+        self.PopupMenu(slicerpop, pos)
 
     def OnMouseMotion(self, evt):
@@ -223,19 +223,19 @@
             self.tr_lastx, self.tr_lasty = self.tr_x, self.tr_y
             x, y = evt.GetPosition()
-            
+
             # Min distance to do anything
             if math.fabs(self.lastx-x)>10 or math.fabs(self.lasty-y)>10:
-                
+
                 self.lastx, self.lasty = self.x, self.y
-        
-                
+
+
                 if math.fabs(self.lastx-x)>math.fabs(self.lasty-y):
                     self.x = x
                 else:
                     self.y = y
-                
+
                 #self.x, self.y = evt.GetPosition()
                 self.Refresh(False)
-                
+
         elif evt.Dragging() and evt.RightIsDown():
             self.lastx, self.lasty = self.x, self.y
@@ -243,19 +243,19 @@
             self.tr_x, self.tr_y = evt.GetPosition()
             self.Refresh(False)
-            
-    def InitGL( self ):      
+
+    def InitGL( self ):
         glutInitDisplayMode (GLUT_DOUBLE | GLUT_RGBA)
         #glShadeModel(GL_FLAT);
-        
+
         glMatrixMode(GL_PROJECTION)
-        
+
         glLight(GL_LIGHT0, GL_AMBIENT, [.2, .2, .2, 0])
-        
+
         # Object color
         #glLight(GL_LIGHT0, GL_DIFFUSE, COLOR_BLUE)
-        
+
         glLight(GL_LIGHT0, GL_POSITION, [1.0, 1.0, -1.0, 0.0])
-        
-        
+
+
         glLightModelfv(GL_LIGHT_MODEL_AMBIENT, [1, 1, 1, 0])
         glEnable(GL_LIGHTING)
@@ -263,10 +263,10 @@
         glEnable(GL_BLEND)
         glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-        
+
         glEnable ( GL_ALPHA_TEST ) ;
         glAlphaFunc ( GL_GREATER, 0 ) ;
         glPixelStorei(GL_PACK_ALIGNMENT, 1)
         glPixelStorei(GL_UNPACK_ALIGNMENT, 1)
-        
+
         glEnable(GL_NORMALIZE)
         glDepthFunc(GL_LESS)
@@ -276,6 +276,6 @@
         #glClear (GL_COLOR_BUFFER_BIT);
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
-        
-        
+
+
         gluPerspective(0, 1.0, 0.1, 60.0);
 
@@ -296,5 +296,5 @@
         glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT)
         # use a fresh transformation matrix
-        
+
         # get the max object size to re-scale
         max_size = 1.0
@@ -305,19 +305,19 @@
             if l>max_size:
                 max_size = l
-        
+
         max_size *= 1.05
         scale = self.scale/max_size
         glScale(scale, scale, scale)
         self.scale = max_size
-        
+
         self.drawAxes()
-        
+
         if self.mouse_down:
             if math.fabs((self.x - self.lastx))>math.fabs((self.y - self.lasty)):
-                angle = 10.0*(self.x - self.lastx) / math.fabs(self.x - self.lastx) 
+                angle = 10.0*(self.x - self.lastx) / math.fabs(self.x - self.lastx)
                 glRotate(angle, self.y_vec[0], self.y_vec[1], self.y_vec[2]);
                 self._rot_y(angle)
             elif math.fabs(self.y - self.lasty)>0:
-                angle = 10.0*(self.y - self.lasty) / math.fabs(self.y - self.lasty) 
+                angle = 10.0*(self.y - self.lasty) / math.fabs(self.y - self.lasty)
                 glRotate(angle, self.x_vec[0], self.x_vec[1], self.x_vec[2]);
                 self._rot_x(angle)
@@ -325,7 +325,7 @@
             self.lasty = self.y
             self.lastx = self.x
-        
-            w,h = self.GetVirtualSizeTuple()
-        
+
+            w, h = self.GetVirtualSize()
+
             # Translate in the x-y plane
             vx = self.x_vec[0] * 2.0*float(self.tr_x - self.tr_lastx)/w \
@@ -335,13 +335,13 @@
             vz = self.x_vec[2] * 2.0*float(self.tr_x - self.tr_lastx)/w \
                + self.y_vec[2] * 2.0*float(self.tr_lasty - self.tr_y)/h
-            
-            glTranslate(self.scale*vx/self.zoom, self.scale*vy/self.zoom, self.scale*vz/self.zoom)    
-                
+
+            glTranslate(self.scale*vx/self.zoom, self.scale*vy/self.zoom, self.scale*vz/self.zoom)
+
         # push into visible buffer
         self.SwapBuffers()
-        
+
     def _matrix_mult(self, v, axis, angle):
         c = math.cos(angle)
-        s = math.sin(angle) 
+        s = math.sin(angle)
         x = axis[0]
         y = axis[1]
@@ -351,13 +351,13 @@
         vz = v[0]*(x*z*(1-c)-y*s) + v[1]*(y*z*(1-c)+x*s) + v[2]*(z*z*(1-c)+c)
         return [vx, vy, vz]
-    
+
     def _rot_y(self, theta):
         """
             Rotate the view by theta around the y-axis
         """
-        angle = theta/180.0*math.pi 
+        angle = theta/180.0*math.pi
         axis = self.y_vec
         self.x_vec = self._matrix_mult(self.x_vec, self.y_vec, -angle)
-        
+
     def _rot_x(self, theta):
         """
@@ -366,6 +366,6 @@
         angle = theta/180.0*math.pi
         self.y_vec = self._matrix_mult(self.y_vec, self.x_vec, -angle)
-        
-        
+
+
     def addShape(self, shape, name=None):
         """
@@ -403,29 +403,29 @@
 
     def drawAxes(self):
-        """ 
+        """
             Draw 3D axes
         """
         pos = self.scale * 0.7
-       
+
         # Z-axis is red
-        zaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01, 
+        zaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01,
                      l_cyl=self.scale*0.1, l_cone=self.scale*0.05)
         zaxis.color = COLOR_RED
         zaxis.draw()
-        
+
         # Y-axis is yellow
-        yaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01, 
+        yaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01,
                      l_cyl=self.scale*0.1, l_cone=self.scale*0.05)
         yaxis.color = COLOR_YELLOW
         yaxis.rotate(-90,0,0)
         yaxis.draw()
-        
+
         # X-axis is green
-        xaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01, 
+        xaxis= Arrow(x=pos, y=-pos, z=0, r_cyl=self.scale*0.005, r_cone=self.scale*0.01,
                      l_cyl=self.scale*0.1, l_cone=self.scale*0.05)
         xaxis.color = COLOR_GREEN
         xaxis.rotate(0,-90,0)
         xaxis.draw()
-        
+
         glLight(GL_LIGHT0, GL_DIFFUSE, DEFAULT_COLOR)
 
@@ -445,5 +445,5 @@
         self.theta_y = 0
         self.theta_z = 0
-        
+
         # Params
         self.params = {}
@@ -453,19 +453,19 @@
         self.details['contrast'] = 'A-2'
         self.details['order']    = ' '
-        
+
         self.highlighted = False
         self.color = DEFAULT_COLOR
-    
+
     def get_volume(self):
         return 0
-    
+
     def get_length(self):
         return 1.0
-    
+
     def highlight(self, value=False):
         self.highlighted = value
-        
+
     def rotate(self, alpha, beta, gamma):
-        """ 
+        """
             Set the rotation angles of the shape
             @param alpha: angle around the x-axis [degrees]
@@ -476,17 +476,17 @@
         self.theta_y = beta
         self.theta_z = gamma
-        
+
     def _rotate(self):
         """
             Perform the OpenGL rotation
-            
+
             Note that the rotation order is reversed.
             We do Y, X, Z do be compatible with simulation...
         """
-        
+
         glRotated(self.theta_z, 0, 0, 1)
         glRotated(self.theta_x, 1, 0, 0)
         glRotated(self.theta_y, 0, 1, 0)
-        
+
     def _pre_draw(self):
         if self.highlighted:
@@ -506,10 +506,10 @@
         self.l_cyl = l_cyl
         self.l_cone = l_cone
-           
+
     def draw(self):
         self._pre_draw()
         glPushMatrix()
         glTranslate(self.x, self.y, self.z)
-        
+
         # Perform rotation
         glRotate(self.theta_x, 1, 0, 0)
@@ -520,10 +520,10 @@
         qobj = gluNewQuadric();
         gluCylinder(qobj, self.r_cyl, self.r_cyl, self.l_cyl, 15, 5);
-                
+
         glTranslate(0, 0, self.z+self.l_cyl)
-        
+
         # Draw cone of the arrow
         glutSolidCone(self.r_cone, self.l_cone, 30, 5)
-        
+
         # Translate back to original position
         glTranslate(-self.x, -self.y, -self.z)
@@ -538,5 +538,5 @@
         self.radius = radius
         self.height = height
-        
+
     def draw(self):
         glPushMatrix()
@@ -556,11 +556,11 @@
         self.params['radius'] = radius
         self.details['radius'] = 'A'
-        
+
     def get_volume(self):
         return 4.0/3.0*math.pi*self.params['radius']*self.params['radius']*self.params['radius']
-        
+
     def get_length(self):
         return 2.0*self.params['radius']
-    
+
     def draw(self):
         self._pre_draw()
@@ -584,6 +584,6 @@
     """
         Cylinder shape, by default the cylinder is oriented along
-        the z-axis. 
-        
+        the z-axis.
+
         The reference point of the cylinder is the center of the
         bottom circle.
@@ -596,8 +596,8 @@
         self.details['radius'] = 'A'
         self.details['length'] = 'A'
-        
+
     def get_volume(self):
         return math.pi*self.params['radius']*self.params['radius']*self.params['length']
-        
+
     def get_length(self):
         if self.params['length']>2.0*self.params['radius']:
@@ -605,11 +605,11 @@
         else:
             return 2.0*self.params['radius']
-        
+
     def draw(self):
         self._pre_draw()
         glPushMatrix()
-        
+
         glTranslate(self.x, self.y, self.z)
-        self._rotate() 
+        self._rotate()
         qobj = gluNewQuadric();
         # gluCylinder(qobj, r_base, r_top, L, div around z, div along z)
@@ -619,15 +619,15 @@
         glPopMatrix()
         glLight(GL_LIGHT0, GL_DIFFUSE, DEFAULT_COLOR)
-        
+
     def accept(self, visitor):
         return visitor.fromCylinder(self)
-        
+
     def accept_update(self, visitor):
         return visitor.update_cylinder(self)
-        
+
 # Fill the shape list
 SHAPE_LIST.append(dict(name='Sphere',   id=wx.NewId(), cl=Sphere))
 SHAPE_LIST.append(dict(name='Cylinder', id=wx.NewId(), cl=Cylinder))
-        
+
 def getShapes():
     """
@@ -635,5 +635,5 @@
     """
     return SHAPE_LIST
-    
+
 def getShapeClass(id):
     """
@@ -647,5 +647,5 @@
         return shape[0]['cl']
     return None
-    
+
 def getShapeClassByName(name):
     """
Index: src/sas/sasgui/plottools/PlotPanel.py
===================================================================
--- src/sas/sasgui/plottools/PlotPanel.py	(revision 75313af5ff7a47b13075dd439585c592071aebaf)
+++ src/sas/sasgui/plottools/PlotPanel.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -339,6 +339,6 @@
         # On Windows platform, default window size is incorrect, so set
         # toolbar width to figure width.
-        tw, th = self.toolbar.GetSizeTuple()
-        fw, fh = self.canvas.GetSizeTuple()
+        tw, th = self.toolbar.GetSize()
+        fw, fh = self.canvas.GetSize()
         # By adding toolbar in sizer, we are able to put it at the bottom
         # of the frame - so appearance is closer to GTK version.
@@ -439,6 +439,6 @@
             y = hi_y
         # Move the legend from its previous location by that same amount
-        loc_in_canvas = self.legend_x - mouse_diff_x, \
-                        self.legend_y - mouse_diff_y
+        loc_in_canvas = (self.legend_x - mouse_diff_x,
+                         self.legend_y - mouse_diff_y)
         # Transform into legend coordinate system
         trans_axes = self.legend.parent.transAxes.inverted()
@@ -630,6 +630,6 @@
         Return values and labels used by Fit Dialog
         """
-        return self.xLabel, self.yLabel, self.Avalue, self.Bvalue, \
-                self.ErrAvalue, self.ErrBvalue, self.Chivalue
+        return (self.xLabel, self.yLabel, self.Avalue, self.Bvalue,
+                self.ErrAvalue, self.ErrBvalue, self.Chivalue)
 
     def setTrans(self, xtrans, ytrans):
@@ -667,6 +667,6 @@
                             title='Linear Fit')
 
-            if (self.xmin != 0.0)and (self.xmax != 0.0)\
-                and(self.xminView != 0.0)and (self.xmaxView != 0.0):
+            if ((self.xmin != 0.0) and (self.xmax != 0.0)
+                    and (self.xminView != 0.0) and (self.xmaxView != 0.0)):
                 dlg.setFitRange(self.xminView, self.xmaxView,
                                 self.xmin, self.xmax)
@@ -925,5 +925,5 @@
         except:
             # toolbar event
-            pos_x, pos_y = self.toolbar.GetPositionTuple()
+            pos_x, pos_y = self.toolbar.GetPosition()
             pos = (pos_x, pos_y + 5)
 
@@ -1059,6 +1059,6 @@
         Allows you to add text to the plot
         """
-        xaxis_label, xaxis_unit, xaxis_font, xaxis_color, \
-                     is_ok, is_tick = self._on_axis_label(axis='x')
+        xaxis_label, xaxis_unit, xaxis_font, xaxis_color, is_ok, is_tick \
+            = self._on_axis_label(axis='x')
         if not is_ok:
             return
@@ -1073,6 +1073,6 @@
         if self.data is not None:
             # 2D
-            self.xaxis(self.xaxis_label, self.xaxis_unit, \
-                        self.xaxis_font, self.xaxis_color, self.xaxis_tick)
+            self.xaxis(self.xaxis_label, self.xaxis_unit,
+                       self.xaxis_font, self.xaxis_color, self.xaxis_tick)
             self.subplot.figure.canvas.draw_idle()
         else:
@@ -1106,6 +1106,6 @@
         Allows you to add text to the plot
         """
-        yaxis_label, yaxis_unit, yaxis_font, yaxis_color, \
-                        is_ok, is_tick = self._on_axis_label(axis='y')
+        yaxis_label, yaxis_unit, yaxis_font, yaxis_color, is_ok, is_tick \
+            = self._on_axis_label(axis='y')
         if not is_ok:
             return
@@ -1120,5 +1120,5 @@
         if self.data is not None:
             # 2D
-            self.yaxis(self.yaxis_label, self.yaxis_unit, \
+            self.yaxis(self.yaxis_label, self.yaxis_unit,
                         self.yaxis_font, self.yaxis_color, self.yaxis_tick)
             self.subplot.figure.canvas.draw_idle()
@@ -1156,7 +1156,8 @@
                 is_tick = textdial.getTickLabel()
                 label_temp = textdial.getText()
-                if label_temp.count("\%s" % "\\") > 0:
+                if r"\\" in label_temp:
+                    label = label_temp.replace(r"\\", r"??")
                     if self.parent is not None:
-                        msg = "Add Label: Error. Can not use double '\\' "
+                        msg = r"Add Label error: Can not use double '\\' "
                         msg += "characters..."
                         wx.PostEvent(self.parent, StatusEvent(status=msg))
@@ -1533,6 +1534,6 @@
         """
         # No qx or qy given in a vector format
-        if self.qx_data is None or self.qy_data is None \
-                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1:
+        if (self.qx_data is None or self.qy_data is None
+                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1):
             # do we need deepcopy here?
             return copy.deepcopy(self.data)
@@ -1593,6 +1594,6 @@
         """
         # No qx or qy given in a vector format
-        if self.qx_data is None or self.qy_data is None \
-                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1:
+        if (self.qx_data is None or self.qy_data is None
+                or self.qx_data.ndim != 1 or self.qy_data.ndim != 1):
             # do we need deepcopy here?
             return copy.deepcopy(self.data)
@@ -1644,7 +1645,6 @@
         """
         # No image matrix given
-        if image is None or np.ndim(image) != 2 \
-                or np.isfinite(image).all() \
-                or weights is None:
+        if (image is None or np.ndim(image) != 2
+                or np.isfinite(image).all() or weights is None):
             return image
         # Get bin size in y and x directions
@@ -1676,18 +1676,18 @@
                     # go 4 next nearest neighbors when no non-zero
                     # neighbor exists
-                    if n_y != 0 and n_x != 0 and \
-                            np.isfinite(image[n_y - 1][n_x - 1]):
+                    if (n_y != 0 and n_x != 0
+                            and np.isfinite(image[n_y - 1][n_x - 1])):
                         temp_image[n_y][n_x] += image[n_y - 1][n_x - 1]
                         weit[n_y][n_x] += 1
-                    if n_y != len_y - 1 and n_x != 0 and \
-                            np.isfinite(image[n_y + 1][n_x - 1]):
+                    if (n_y != len_y - 1 and n_x != 0
+                            and np.isfinite(image[n_y + 1][n_x - 1])):
                         temp_image[n_y][n_x] += image[n_y + 1][n_x - 1]
                         weit[n_y][n_x] += 1
-                    if n_y != len_y and n_x != len_x - 1 and \
-                            np.isfinite(image[n_y - 1][n_x + 1]):
+                    if (n_y != len_y and n_x != len_x - 1
+                            and np.isfinite(image[n_y - 1][n_x + 1])):
                         temp_image[n_y][n_x] += image[n_y - 1][n_x + 1]
                         weit[n_y][n_x] += 1
-                    if n_y != len_y - 1 and n_x != len_x - 1 and \
-                            np.isfinite(image[n_y + 1][n_x + 1]):
+                    if (n_y != len_y - 1 and n_x != len_x - 1
+                            and np.isfinite(image[n_y + 1][n_x + 1])):
                         temp_image[n_y][n_x] += image[n_y + 1][n_x + 1]
                         weit[n_y][n_x] += 1
@@ -1784,12 +1784,12 @@
                 item.transformX(transform.toX2, transform.errToX2)
                 xunits = convert_unit(2, xunits)
-                self.graph._xaxis_transformed("%s^{2}" % xname, "%s" % xunits)
+                self.graph._xaxis_transformed("%s^2" % xname, "%s" % xunits)
             if self.xLabel == "x^(4)":
                 item.transformX(transform.toX4, transform.errToX4)
                 xunits = convert_unit(4, xunits)
-                self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits)
+                self.graph._xaxis_transformed("%s^4" % xname, "%s" % xunits)
             if self.xLabel == "ln(x)":
                 item.transformX(transform.toLogX, transform.errToLogX)
-                self.graph._xaxis_transformed("\ln{(%s)}" % xname, "%s" % xunits)
+                self.graph._xaxis_transformed(r"\ln(%s)" % xname, "%s" % xunits)
             if self.xLabel == "log10(x)":
                 item.transformX(transform.toX_pos, transform.errToX_pos)
@@ -1799,9 +1799,9 @@
                 item.transformX(transform.toX4, transform.errToX4)
                 xunits = convert_unit(4, xunits)
-                self.graph._xaxis_transformed("%s^{4}" % xname, "%s" % xunits)
+                self.graph._xaxis_transformed("%s^4" % xname, "%s" % xunits)
                 _xscale = 'log'
             if self.yLabel == "ln(y)":
                 item.transformY(transform.toLogX, transform.errToLogX)
-                self.graph._yaxis_transformed("\ln{(%s)}" % yname, "%s" % yunits)
+                self.graph._yaxis_transformed(r"\ln(%s)" % yname, "%s" % yunits)
             if self.yLabel == "y":
                 item.transformY(transform.toX, transform.errToX)
@@ -1822,10 +1822,10 @@
                 item.transformY(transform.toYX2, transform.errToYX2)
                 xunits = convert_unit(2, self.xaxis_unit)
-                self.graph._yaxis_transformed("%s \ \ %s^{2}" % (yname, xname),
+                self.graph._yaxis_transformed(r"%s \ \ %s^2" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "y*x^(4)":
                 item.transformY(transform.toYX4, transform.errToYX4)
                 xunits = convert_unit(4, self.xaxis_unit)
-                self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname),
+                self.graph._yaxis_transformed(r"%s \ \ %s^4" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "1/sqrt(y)":
@@ -1833,19 +1833,19 @@
                                 transform.errOneOverSqrtX)
                 yunits = convert_unit(-0.5, yunits)
-                self.graph._yaxis_transformed("1/\sqrt{%s}" % yname,
+                self.graph._yaxis_transformed(r"1/\sqrt{%s}" % yname,
                                               "%s" % yunits)
             if self.yLabel == "ln(y*x)":
                 item.transformY(transform.toLogXY, transform.errToLogXY)
-                self.graph._yaxis_transformed("\ln{(%s \ \ %s)}" % (yname, xname),
+                self.graph._yaxis_transformed(r"\ln(%s \ \ %s)" % (yname, xname),
                                               "%s%s" % (yunits, self.xaxis_unit))
             if self.yLabel == "ln(y*x^(2))":
                 item.transformY(transform.toLogYX2, transform.errToLogYX2)
                 xunits = convert_unit(2, self.xaxis_unit)
-                self.graph._yaxis_transformed("\ln (%s \ \ %s^{2})" % (yname, xname),
+                self.graph._yaxis_transformed(r"\ln(%s \ \ %s^2)" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "ln(y*x^(4))":
                 item.transformY(transform.toLogYX4, transform.errToLogYX4)
                 xunits = convert_unit(4, self.xaxis_unit)
-                self.graph._yaxis_transformed("\ln (%s \ \ %s^{4})" % (yname, xname),
+                self.graph._yaxis_transformed(r"\ln(%s \ \ %s^4)" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             if self.yLabel == "log10(y*x^(4))":
@@ -1853,5 +1853,5 @@
                 xunits = convert_unit(4, self.xaxis_unit)
                 _yscale = 'log'
-                self.graph._yaxis_transformed("%s \ \ %s^{4}" % (yname, xname),
+                self.graph._yaxis_transformed(r"%s \ \ %s^4" % (yname, xname),
                                               "%s%s" % (yunits, xunits))
             item.transformView()
@@ -1897,5 +1897,5 @@
         # Saving value to redisplay in Fit Dialog when it is opened again
         self.Avalue, self.Bvalue, self.ErrAvalue, \
-                      self.ErrBvalue, self.Chivalue = func
+            self.ErrBvalue, self.Chivalue = func
         self.xminView = xminView
         self.xmaxView = xmaxView
Index: src/sas/sasgui/plottools/canvas.py
===================================================================
--- src/sas/sasgui/plottools/canvas.py	(revision 5251ec6db8aae214addfa0a5a1da16820994958b)
+++ src/sas/sasgui/plottools/canvas.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -53,7 +53,7 @@
         ppw = 1
         pph = 1
-    (pgw, _) = self.GetPageSizePixels()  # page size in pixels
-    (dcw, _) = dc.GetSize()
-    (grw, _) = self.canvas.GetSizeTuple()
+    pgw, _ = self.GetPageSizePixels()  # page size in pixels
+    dcw, _ = dc.GetSize()
+    grw, _ = self.canvas.GetSize()
 
     # save current figure dpi resolution and bg color,
@@ -152,7 +152,9 @@
         Render after a delay if no other render requests have been made.
         """
-        self.panel.subplot.grid(self.panel.grid_on)
-        if self.panel.legend is not None and self.panel.legend_pos_loc:
-            self.panel.legend._loc = self.panel.legend_pos_loc
+        if self.panel is not None:
+            # TODO: grid/panel manip doesn't belong here
+            self.panel.subplot.grid(self.panel.grid_on)
+            if self.panel.legend is not None and self.panel.legend_pos_loc:
+                self.panel.legend._loc = self.panel.legend_pos_loc
         self.idletimer.Restart(5, *args, **kwargs)  # Delay by 5 ms
 
Index: src/sas/sasgui/plottools/toolbar.py
===================================================================
--- src/sas/sasgui/plottools/toolbar.py	(revision cb64d86aa05427be27c71cc415727ce4d7fdce69)
+++ src/sas/sasgui/plottools/toolbar.py	(revision 34f23c81aa61f99e9fa067689ac823e11cfecde3)
@@ -158,6 +158,6 @@
         """
         _dc = self.GetDC()
-        (_dcX, _dcY) = _dc.GetSizeTuple()
-        (_bmpX,_bmpY) = self.canvas.GetSize()
+        _dcX, _dcY = _dc.GetSize()
+        _bmpX, _bmpY = self.canvas.GetSize()
         _scale = min(_dcX/_bmpX, _dcY/_bmpY)
         _dc.SetUserScale(_scale, _scale)
