Fixed some bugs
[hooke.git] / hooke.py
index 21cd50993ef8f83a3396e52cfa98618770a78abf..6bceecbd5d6043c30c2f971b0821d2f01c609a17 100755 (executable)
--- a/hooke.py
+++ b/hooke.py
@@ -1,4 +1,5 @@
 #!/usr/bin/env python\r
+# -*- coding: utf-8 -*-\r
 \r
 '''\r
 HOOKE - A force spectroscopy review & analysis tool\r
@@ -260,6 +261,11 @@ class MainWindow(wx.Frame):
         self.figures=[control.get_figure() for control in self.controls]\r
         self.axes=[figure.gca() for figure in self.figures]\r
 \r
+       for i in range(len(self.axes)):\r
+         self.axes[i].xaxis.set_major_formatter(EngrFormatter())\r
+         self.axes[i].yaxis.set_major_formatter(EngrFormatter(2))\r
+\r
+\r
         self.cpanels[1].Hide()\r
         self.mainpanel.splitter.Initialize(self.cpanels[0])\r
 \r
@@ -474,8 +480,8 @@ class MainWindow(wx.Frame):
 \r
         for plot in self.plots:\r
             '''\r
-                MAIN LOOP FOR ALL PLOTS (now only 2 are allowed but...)\r
-                '''\r
+            MAIN LOOP FOR ALL PLOTS (now only 2 are allowed but...)\r
+            '''\r
             if 'destination' in dir(plot):\r
                 dest=plot.destination\r
 \r
@@ -540,6 +546,11 @@ class MainWindow(wx.Frame):
                 ylim=self.axes[dest].get_ylim()        \r
                 self.axes[dest].set_ylim((ylim[1],ylim[0])) \r
 \r
+           for i in range(len(self.axes)):\r
+             self.axes[i].xaxis.set_major_formatter(EngrFormatter())\r
+             self.axes[i].yaxis.set_major_formatter(EngrFormatter(2))\r
+\r
+\r
             self.controls[dest].draw()\r
 \r
 \r