Index: src/sas/qtgui/LinearFit.py
===================================================================
--- src/sas/qtgui/LinearFit.py	(revision 87cc73a1ade6168487d1841f4c285fadcf532e0c)
+++ src/sas/qtgui/LinearFit.py	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -70,4 +70,6 @@
         self.transform = transform
 
+        self.setFixedSize(self.minimumSizeHint())
+
         # connect Fit button
         self.cmdFit.clicked.connect(self.fit)
@@ -79,13 +81,4 @@
         assert(isinstance(label, basestring))
         self.lblRange.setText(label)
-
-    def a(self):
-        return (float(self.txtA.text()), float(self.txtAerr.text()))
-
-    def b(self):
-        return (float(self.txtB.text()), float(self.txtBerr.text()))
-
-    def chi(self):
-        return float(self.txtChi2.text())
 
     def range(self):
Index: src/sas/qtgui/UI/LinearFitUI.ui
===================================================================
--- src/sas/qtgui/UI/LinearFitUI.ui	(revision 570a58f9169c78f01c6e69cc89a1960671e5a13d)
+++ src/sas/qtgui/UI/LinearFitUI.ui	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -7,10 +7,10 @@
     <x>0</x>
     <y>0</y>
-    <width>413</width>
-    <height>327</height>
+    <width>439</width>
+    <height>324</height>
    </rect>
   </property>
   <property name="sizePolicy">
-   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+   <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
     <horstretch>0</horstretch>
     <verstretch>0</verstretch>
@@ -28,9 +28,90 @@
     <widget class="QLabel" name="label">
      <property name="text">
-      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Perform fit for &lt;span style=&quot; font-style:italic;&quot;&gt;y(x) = ax + b&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Perform fit for &lt;span style=&quot; font-weight:600; font-style:italic;&quot;&gt;y(x) = ax + b&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
      </property>
     </widget>
    </item>
    <item row="1" column="0" colspan="2">
+    <widget class="QGroupBox" name="groupBox_2">
+     <property name="title">
+      <string>Fit ranges</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_3">
+      <item row="0" column="0">
+       <layout class="QGridLayout" name="gridLayout_2">
+        <item row="0" column="1">
+         <widget class="QLabel" name="label_9">
+          <property name="text">
+           <string>Min</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2">
+         <widget class="QLabel" name="label_10">
+          <property name="text">
+           <string>Max</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="label_8">
+          <property name="text">
+           <string>Range (linear scale)</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QLineEdit" name="txtRangeMin">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum value on the x-axis for the plotted data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="autoFillBackground">
+           <bool>true</bool>
+          </property>
+          <property name="readOnly">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2">
+         <widget class="QLineEdit" name="txtRangeMax">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maximum value on the x-axis for the plotted data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+          <property name="autoFillBackground">
+           <bool>true</bool>
+          </property>
+          <property name="readOnly">
+           <bool>true</bool>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="0">
+         <widget class="QLabel" name="lblRange">
+          <property name="text">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fit range&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="1">
+         <widget class="QLineEdit" name="txtFitRangeMin">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the minimum value on the x-axis to be included in the fit.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+        <item row="2" column="2">
+         <widget class="QLineEdit" name="txtFitRangeMax">
+          <property name="toolTip">
+           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the maximum value on the x-axis to be included in the fit.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="2">
     <widget class="QGroupBox" name="groupBox">
      <property name="title">
@@ -134,83 +215,8 @@
     </widget>
    </item>
-   <item row="2" column="0" colspan="2">
-    <widget class="QGroupBox" name="groupBox_2">
-     <property name="title">
-      <string>Fit ranges</string>
-     </property>
-     <layout class="QGridLayout" name="gridLayout_3">
-      <item row="0" column="0">
-       <layout class="QGridLayout" name="gridLayout_2">
-        <item row="0" column="1">
-         <widget class="QLabel" name="label_9">
-          <property name="text">
-           <string>Min</string>
-          </property>
-         </widget>
-        </item>
-        <item row="0" column="2">
-         <widget class="QLabel" name="label_10">
-          <property name="text">
-           <string>Max</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="0">
-         <widget class="QLabel" name="label_8">
-          <property name="text">
-           <string>Range (linear scale)</string>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="1">
-         <widget class="QLineEdit" name="txtRangeMin">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Minimum value on the x-axis for the plotted data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="readOnly">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="1" column="2">
-         <widget class="QLineEdit" name="txtRangeMax">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Maximum value on the x-axis for the plotted data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-          <property name="readOnly">
-           <bool>true</bool>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="0">
-         <widget class="QLabel" name="lblRange">
-          <property name="text">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Fit range&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="1">
-         <widget class="QLineEdit" name="txtFitRangeMin">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the minimum value on the x-axis to be included in the fit.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-         </widget>
-        </item>
-        <item row="2" column="2">
-         <widget class="QLineEdit" name="txtFitRangeMax">
-          <property name="toolTip">
-           <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Enter the maximum value on the x-axis to be included in the fit.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-          </property>
-         </widget>
-        </item>
-       </layout>
-      </item>
-     </layout>
-    </widget>
-   </item>
    <item row="3" column="0" colspan="2">
     <widget class="QLabel" name="label_2">
      <property name="text">
-      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#ff0000;&quot;&gt;WARNING! Resolution is NOT accounted for.&lt;br/&gt;Thus slit smeared data will give very wrong answers!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+      <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; color:#000000;&quot;&gt;Resolution is NOT accounted for.&lt;br/&gt;Slit smeared data will give very wrong answers!&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
      </property>
     </widget>
Index: src/sas/qtgui/UI/SetGraphRangeUI.ui
===================================================================
--- src/sas/qtgui/UI/SetGraphRangeUI.ui	(revision d3ca36332a95a5caf23ee8f8223a9c9912826726)
+++ src/sas/qtgui/UI/SetGraphRangeUI.ui	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -19,4 +19,8 @@
   <property name="windowTitle">
    <string>Set Graph Range</string>
+  </property>
+  <property name="windowIcon">
+   <iconset resource="main_resources.qrc">
+    <normaloff>:/res/ball.ico</normaloff>:/res/ball.ico</iconset>
   </property>
   <property name="modal">
@@ -93,5 +97,7 @@
   </layout>
  </widget>
- <resources/>
+ <resources>
+  <include location="main_resources.qrc"/>
+ </resources>
  <connections>
   <connection>
Index: src/sas/qtgui/UI/convert_all.sh
===================================================================
--- src/sas/qtgui/UI/convert_all.sh	(revision 9290b1a2e57458d51b13f1acd1798b999372c7d7)
+++ src/sas/qtgui/UI/convert_all.sh	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -1,5 +1,5 @@
 # UI -> PY
 for filename in *.ui; do
-  pyuic.bat $filename > "`basename "$filename" .ui`.py"
+  pyuic4 $filename > "`basename "$filename" .ui`.py"
 done
 
Index: src/sas/qtgui/UI/convert_ui.sh
===================================================================
--- src/sas/qtgui/UI/convert_ui.sh	(revision f51ed677cd8461e82d4cf08d0c78ef678c8f9433)
+++ src/sas/qtgui/UI/convert_ui.sh	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -1,1 +1,1 @@
-pyuic.bat $1.ui > $1.py
+pyuic4 $1.ui > $1.py
Index: src/sas/qtgui/UnitTesting/LinearFitTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/LinearFitTest.py	(revision b46f285a3e36e0f686120f9c8095a9c6da2d81b0)
+++ src/sas/qtgui/UnitTesting/LinearFitTest.py	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -4,5 +4,4 @@
 
 from PyQt4 import QtGui
-from PyQt4 import QtCore
 from mock import MagicMock
 
@@ -10,5 +9,4 @@
 import path_prepare
 
-from UnitTesting.TestUtils import QtSignalSpy
 from sas.sasgui.guiframe.dataFitting import Data1D
 import sas.qtgui.Plotter as Plotter
@@ -61,5 +59,6 @@
         # Compare
         self.assertItemsEqual(return_values[0], [1.0, 3.0])
-        self.assertItemsEqual(return_values[1], [10.004054329087303, 12.030439848443539])
+        self.assertAlmostEqual(return_values[1][0], 10.004054329, 6)
+        self.assertAlmostEqual(return_values[1][1], 12.030439848, 6)
 
         # Set the log scale
@@ -69,5 +68,6 @@
         # Compare
         self.assertItemsEqual(return_values[0], [1.0, 3.0])
-        self.assertItemsEqual(return_values[1], [9.9877329376711437, 11.843650824649025])
+        self.assertAlmostEqual(return_values[1][0], 9.987732937, 6)
+        self.assertAlmostEqual(return_values[1][1], 11.84365082, 6)
 
     def testOrigData(self):
@@ -81,6 +81,10 @@
 
         self.assertItemsEqual(x, orig_x)
-        self.assertItemsEqual(y, orig_y)
-        self.assertItemsEqual(dy, orig_dy)
+        self.assertEqual(y[0], orig_y[0])
+        self.assertAlmostEqual(y[1], orig_y[1], 8)
+        self.assertAlmostEqual(y[2], orig_y[2], 8)
+        self.assertEqual(dy[0], orig_dy[0])
+        self.assertAlmostEqual(dy[1], orig_dy[1], 8)
+        self.assertAlmostEqual(dy[2], orig_dy[2], 8)
 
         # x, y
@@ -107,6 +111,10 @@
 
         self.assertItemsEqual(x, orig_x)
-        self.assertItemsEqual(y, orig_y)
-        self.assertItemsEqual(dy, orig_dy)
+        self.assertEqual(y[0], orig_y[0])
+        self.assertAlmostEqual(y[1], orig_y[1], 8)
+        self.assertAlmostEqual(y[2], orig_y[2], 8)
+        self.assertEqual(dy[0], orig_dy[0])
+        self.assertAlmostEqual(dy[1], orig_dy[1], 8)
+        self.assertAlmostEqual(dy[2], orig_dy[2], 8)
 
     def testCheckFitValues(self):
@@ -114,5 +122,6 @@
         # Good values
         self.assertTrue(self.widget.checkFitValues(self.widget.txtFitRangeMin))
-        self.assertEqual(self.widget.txtFitRangeMin.palette().color(10).name(), "#f0f0f0")
+        # Colors platform dependent
+        #self.assertEqual(self.widget.txtFitRangeMin.palette().color(10).name(), "#f0f0f0")
         # Bad values
         self.widget.x_is_log = True
Index: src/sas/qtgui/UnitTesting/PlotterTest.py
===================================================================
--- src/sas/qtgui/UnitTesting/PlotterTest.py	(revision db5cd8da62c5627b9811d209d913219ab45e3c75)
+++ src/sas/qtgui/UnitTesting/PlotterTest.py	(revision 2e3e95954828438b02ef55c47cd9553fe9a7a87a)
@@ -14,4 +14,6 @@
 from sas.sasgui.guiframe.dataFitting import Data2D
 from UnitTesting.TestUtils import WarningTestNotImplemented
+from sas.qtgui.LinearFit import LinearFit
+from sas.qtgui.PlotProperties import PlotProperties
 
 # Tested module
@@ -224,33 +226,188 @@
     def testOnLinearFit(self):
         """ Checks the response to LinearFit call """
-        WarningTestNotImplemented()
+        self.plotter.plot(self.data)
+        self.plotter.show()
+        QtGui.QDialog.exec_ = MagicMock(return_value=QtGui.QDialog.Accepted)
+
+        # Just this one plot
+        self.assertEqual(len(self.plotter.plot_dict.keys()), 1)
+        self.plotter.onLinearFit(1)
+
+        # Check that exec_ got called
+        self.assertTrue(QtGui.QDialog.exec_.called)
 
     def testOnRemovePlot(self):
         """ Assure plots get removed when requested """
-        WarningTestNotImplemented()
+        # Add two plots
+        self.plotter.show()
+        self.plotter.plot(self.data)
+        data2 = Data1D(x=[1.0, 2.0, 3.0],
+                       y=[11.0, 12.0, 13.0],
+                       dx=[0.1, 0.2, 0.3],
+                       dy=[0.1, 0.2, 0.3])
+        data2.title="Test data 2"
+        data2.name="Test name 2"
+        data2.id = 2
+        self.plotter.plot(data2)
+
+        # Assure the plotter window is visible
+        self.assertTrue(self.plotter.isVisible())
+
+        # Assure we have two sets
+        self.assertEqual(len(self.plotter.plot_dict.keys()), 2)
+
+        # Delete one set
+        self.plotter.onRemovePlot(2)
+        # Assure we have two sets
+        self.assertEqual(len(self.plotter.plot_dict.keys()), 1)
+
+        self.plotter.manager = MagicMock()
+
+        # Delete the remaining set
+        self.plotter.onRemovePlot(1)
+        # Assure we have no plots
+        self.assertEqual(len(self.plotter.plot_dict.keys()), 0)
+        # Assure the plotter window is closed
+        self.assertFalse(self.plotter.isVisible())
+
 
     def testRemovePlot(self):
         """ Test plot removal """
-        WarningTestNotImplemented()
+        # Add two plots
+        self.plotter.show()
+        self.plotter.plot(self.data)
+        data2 = Data1D(x=[1.0, 2.0, 3.0],
+                       y=[11.0, 12.0, 13.0],
+                       dx=[0.1, 0.2, 0.3],
+                       dy=[0.1, 0.2, 0.3])
+        data2.title="Test data 2"
+        data2.name="Test name 2"
+        data2.id = 2
+        data2._xaxis = "XAXIS"
+        data2._xunit = "furlong*fortnight^{-1}"
+        data2._yaxis = "YAXIS"
+        data2._yunit = "cake"
+        data2.hide_error = True
+        self.plotter.plot(data2)
+
+        # delete plot 1
+        self.plotter.removePlot(1)
+
+        # See that the labels didn't change
+        xl = self.plotter.ax.xaxis.label.get_text()
+        yl = self.plotter.ax.yaxis.label.get_text()
+        self.assertEqual(xl, "$XAXIS(furlong*fortnight^{-1})$")
+        self.assertEqual(yl, "$YAXIS(cake)$")
+        # The hide_error flag should also remain
+        self.assertTrue(self.plotter.plot_dict[2].hide_error)
 
     def testOnToggleHideError(self):
         """ Test the error bar toggle on plots """
-        WarningTestNotImplemented()
+        # Add two plots
+        self.plotter.show()
+        self.plotter.plot(self.data)
+        data2 = Data1D(x=[1.0, 2.0, 3.0],
+                       y=[11.0, 12.0, 13.0],
+                       dx=[0.1, 0.2, 0.3],
+                       dy=[0.1, 0.2, 0.3])
+        data2.title="Test data 2"
+        data2.name="Test name 2"
+        data2.id = 2
+        data2._xaxis = "XAXIS"
+        data2._xunit = "furlong*fortnight^{-1}"
+        data2._yaxis = "YAXIS"
+        data2._yunit = "cake"
+        error_status = True
+        data2.hide_error = error_status
+        self.plotter.plot(data2)
+
+        # Reverse the toggle
+        self.plotter.onToggleHideError(2)
+        # See that the labels didn't change
+        xl = self.plotter.ax.xaxis.label.get_text()
+        yl = self.plotter.ax.yaxis.label.get_text()
+        self.assertEqual(xl, "$XAXIS(furlong*fortnight^{-1})$")
+        self.assertEqual(yl, "$YAXIS(cake)$")
+        # The hide_error flag should toggle
+        self.assertEqual(self.plotter.plot_dict[2].hide_error, not error_status)
 
     def testOnFitDisplay(self):
         """ Test the fit line display on the chart """
-        WarningTestNotImplemented()
+        self.assertIsInstance(self.plotter.fit_result, Data1D)
+        self.assertEqual(self.plotter.fit_result.symbol, 13)
+        self.assertEqual(self.plotter.fit_result.name, "Fit")
+
+        # fudge some init data
+        fit_data = [[0.0,0.0], [5.0,5.0]]
+        # Call the method
+        self.plotter.plot = MagicMock()
+        self.plotter.onFitDisplay(fit_data)
+        self.assertTrue(self.plotter.plot.called)
+        # Look at arguments passed to .plot()
+        self.plotter.plot.assert_called_with(data=self.plotter.fit_result,
+                                             hide_error=True, marker='-')
 
     def testReplacePlot(self):
         """ Test the plot refresh functionality """
-        WarningTestNotImplemented()
-
-    def testReplacePlot(self):
-        """ Test the plot refresh functionality """
-        WarningTestNotImplemented(sys._getframe().f_code.co_name)
+        # Add original data
+        self.plotter.show()
+        self.plotter.plot(self.data)
+        # See the default labels
+        xl = self.plotter.ax.xaxis.label.get_text()
+        yl = self.plotter.ax.yaxis.label.get_text()
+        self.assertEqual(xl, "$()$")
+        self.assertEqual(yl, "$()$")
+
+        # Prepare new data
+        data2 = Data1D(x=[1.0, 2.0, 3.0],
+                       y=[11.0, 12.0, 13.0],
+                       dx=[0.1, 0.2, 0.3],
+                       dy=[0.1, 0.2, 0.3])
+        data2.title="Test data 2"
+        data2.name="Test name 2"
+        data2.id = 2
+        data2._xaxis = "XAXIS"
+        data2._xunit = "furlong*fortnight^{-1}"
+        data2._yaxis = "YAXIS"
+        data2._yunit = "cake"
+        error_status = True
+        data2.hide_error = error_status
+
+        # Replace data in plot
+        self.plotter.replacePlot(1, data2)
+
+        # See that the labels changed
+        xl = self.plotter.ax.xaxis.label.get_text()
+        yl = self.plotter.ax.yaxis.label.get_text()
+        self.assertEqual(xl, "$XAXIS(furlong*fortnight^{-1})$")
+        self.assertEqual(yl, "$YAXIS(cake)$")
+        # The hide_error flag should be as set
+        self.assertEqual(self.plotter.plot_dict[2].hide_error, error_status)
 
     def testOnModifyPlot(self):
         """ Test the functionality for changing plot properties """
-        WarningTestNotImplemented()
+        # Prepare new data
+        data2 = Data1D(x=[1.0, 2.0, 3.0],
+                       y=[11.0, 12.0, 13.0],
+                       dx=[0.1, 0.2, 0.3],
+                       dy=[0.1, 0.2, 0.3])
+        data2.title="Test data 2"
+        data2.name="Test name 2"
+        data2.id = 2
+        data2.custom_color = None
+        data2.symbol = 1
+        data2.markersize = 11
+
+        self.plotter.plot(data2)
+
+        with patch('PlotProperties.PlotProperties') as mock:
+            instance = mock.return_value
+            QtGui.QDialog.exec_ = MagicMock(return_value=QtGui.QDialog.Accepted)
+            instance.symbol.return_value = 7
+
+            self.plotter.onModifyPlot(2)
+
+            #print self.plotter.plot_dict[2].symbol
+
 
 if __name__ == "__main__":
