(autopeak.py) fixed stuff about color management
authordevicerandom <devnull@localhost>
Tue, 3 Mar 2009 17:58:58 +0000 (17:58 +0000)
committerdevicerandom <devnull@localhost>
Tue, 3 Mar 2009 17:58:58 +0000 (17:58 +0000)
autopeak.py
hooke.py

index 8638cc2273b0f5a0f2d2169cdefe3e35a4d68546..fdce95efb5dacb16e979e069253907bc66b75e0c 100644 (file)
@@ -244,8 +244,10 @@ class autopeakCommands:
                 fitplot.add_set(xfit,yfit)
                 if len(fitplot.styles)==0:
                     fitplot.styles=[]
+                    fitplot.colors=[]
                 else:
                     fitplot.styles.append(None)
+                    fitplot.colors.append(None)
             else: #2-value fit
                 p_leng=params[1]*(1.0e+9)
                 #check if persistent length makes sense. otherwise, discard peak.
@@ -261,6 +263,7 @@ class autopeakCommands:
                     fitplot.add_set(xfit,yfit)
                     if len(fitplot.styles)==0:
                         fitplot.styles=[]
+                        fitplot.colors=[]
                     else:
                         fitplot.styles.append(None)
                         fitplot.colors.append(None)
@@ -271,7 +274,7 @@ class autopeakCommands:
         #add basepoints to fitplot
         fitplot.add_set([self.basepoints[0].graph_coords[0],self.basepoints[1].graph_coords[0]],[self.basepoints[0].graph_coords[1],self.basepoints[1].graph_coords[1]]) 
         fitplot.styles.append('scatter')
-        
+        fitplot.colors.append(None)
         
         #Show wlc fits and peak locations
         self._send_plot([fitplot])
index 43110701da2eeeea56643eafcddf161f01d96f53..fe02f25b54225675857fb3e79b2156b8b9e0e9a4 100755 (executable)
--- a/hooke.py
+++ b/hooke.py
@@ -275,8 +275,8 @@ class MainWindow(wx.Frame):
             self.click_plot=0
                         
             #FIXME: These could become a single flag with different (string?) values
-            self.on_measure_distance=False
-            self.on_measure_force=False
+            #self.on_measure_distance=False
+            #self.on_measure_force=False
             
             self.plot_fit=False
             
@@ -284,13 +284,16 @@ class MainWindow(wx.Frame):
             self.num_of_points = 2
             
             #Data.
+            '''
             self.current_x_ext=[[],[]]
             self.current_y_ext=[[],[]]
             self.current_x_ret=[[],[]]
             self.current_y_ret=[[],[]]
             
+            
             self.current_x_unit=[None,None]
             self.current_y_unit=[None,None]
+            '''
                         
             #Initialize xaxes, yaxes
             #FIXME: should come from config