Plotting commands now return the plots they generate.
authorW. Trevor King <wking@drexel.edu>
Mon, 26 Mar 2012 21:18:59 +0000 (17:18 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 26 Mar 2012 21:18:59 +0000 (17:18 -0400)
This lets you manipulate them in external code to fine tune them to
your particular situation.  The default plots are useful, but not
always beautiful.  Now you can write a script to generate beautiful
plots for your poster without duplicating code from the plot
functions.

calibcant/analyze.py
calibcant/bump_analyze.py
calibcant/temperature_analyze.py
calibcant/vibration_analyze.py

index 1774c0b7f3a9c32383dc4c180eb37d379181f45d..67d6908418321369350094e39bf225af04d10b29 100644 (file)
@@ -183,6 +183,7 @@ def plot(bumps, temperatures, vibrations):
 
     if hasattr(figure, 'show'):
         figure.show()
+    return figure
 _plot = plot  # alternative name for use inside analyze_all()
 
 
index d5256fc84bd1ea660c05c81b6bfc73d188d35de9..babcb05a5647bcef865094c681841ce949d28311 100644 (file)
@@ -400,4 +400,5 @@ def plot(data, yguess=None, yfit=None):
         residual_axes.set_ylabel('Photodiode (Volts)')
     if hasattr(figure, 'show'):
         figure.show()
+    return plot
 _plot = plot  # alternative name for use inside fit()
index 1cca2c9e66bf5bb0d63477e9d8d293d851b10d42..7e48adcd3e21095de976c467f27ab3bed3397d71 100644 (file)
@@ -159,3 +159,4 @@ def plot(raw=None, processed=None):
         axes2.plot(processed, label='processed')
     if hasattr(figure, 'show'):
         figure.show()
+    return figure
index 8959d372bce29d93bf9aed4afe7ee7657122791e..0cfb27ca4ff8d4c72a4178750ecdba04e25d3ad6 100644 (file)
@@ -559,4 +559,5 @@ def plot(deflection=None, freq_axis=None, power=None, A=None, B=None,
         freq_axes.set_ylabel('PSD')
     if hasattr(figure, 'show'):
         figure.show()
+    return figure
 _plot = plot  # alternative name for use inside analyze()