Use tight autoscaling for bump plots.
authorW. Trevor King <wking@drexel.edu>
Mon, 26 Mar 2012 21:23:33 +0000 (17:23 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 26 Mar 2012 21:23:33 +0000 (17:23 -0400)
calibcant/bump_analyze.py

index babcb05a5647bcef865094c681841ce949d28311..d855909042294fed6593fee1460087e055a433bb 100644 (file)
@@ -387,6 +387,7 @@ def plot(data, yguess=None, yfit=None):
     if yfit != None:
         axes.plot(data['z'], yfit, 'r-', label='fit')
 
+    axes.autoscale(tight=True)
     axes.set_title('bump surface %s' % timestamp)
     #axes.legend(loc='upper left')
     axes.set_xlabel('Z piezo (meters)')
@@ -395,6 +396,7 @@ def plot(data, yguess=None, yfit=None):
         # second subplot for residual
         residual_axes.plot(data['z'], data['deflection'] - yfit,
                            'r-', label='residual')
+        residual_axes.autoscale(tight=True)
         #residual_axes.legend(loc='upper right')
         residual_axes.set_xlabel('Z piezo (meters)')
         residual_axes.set_ylabel('Photodiode (Volts)')