projects
/
calibcant.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
68caacd
)
Use tight autoscaling for vibration plots.
author
W. Trevor King
<wking@drexel.edu>
Mon, 26 Mar 2012 20:40:36 +0000
(16:40 -0400)
committer
W. Trevor King
<wking@drexel.edu>
Mon, 26 Mar 2012 20:40:36 +0000
(16:40 -0400)
calibcant/vibration_analyze.py
patch
|
blob
|
history
diff --git
a/calibcant/vibration_analyze.py
b/calibcant/vibration_analyze.py
index 107ca3882cbfa496a532c55d82d22d0a54ae4e31..8959d372bce29d93bf9aed4afe7ee7657122791e 100644
(file)
--- a/
calibcant/vibration_analyze.py
+++ b/
calibcant/vibration_analyze.py
@@
-512,6
+512,7
@@
def plot(deflection=None, freq_axis=None, power=None, A=None, B=None,
if deflection is not None:
time_axes.plot(deflection, 'r.')
if deflection is not None:
time_axes.plot(deflection, 'r.')
+ time_axes.autoscale(tight=True)
time_axes.set_title('free oscillation')
# plot histogram distribution and gaussian fit
time_axes.set_title('free oscillation')
# plot histogram distribution and gaussian fit
@@
-527,10
+528,12
@@
def plot(deflection=None, freq_axis=None, power=None, A=None, B=None,
# Matplotlib's normed histogram uses bin heights of n/(len(x)*dbin)
dbin = bins[1]-bins[0]
hist_axes.plot(bins, gauss/dbin, 'r-')
# Matplotlib's normed histogram uses bin heights of n/(len(x)*dbin)
dbin = bins[1]-bins[0]
hist_axes.plot(bins, gauss/dbin, 'r-')
+ hist_axes.autoscale(tight=True)
if power is not None:
freq_axes.hold(True)
freq_axes.set_yscale('log')
freq_axes.plot(freq_axis, power, 'r.-')
if power is not None:
freq_axes.hold(True)
freq_axes.set_yscale('log')
freq_axes.plot(freq_axis, power, 'r.-')
+ freq_axes.autoscale(tight=True)
xmin,xmax = freq_axes.get_xbound()
ymin,ymax = freq_axes.get_ybound()
xmin,xmax = freq_axes.get_xbound()
ymin,ymax = freq_axes.get_ybound()