diff options
author | John Glover <j@johnglover.net> | 2012-09-11 22:31:24 +0200 |
---|---|---|
committer | John Glover <j@johnglover.net> | 2012-09-11 22:31:24 +0200 |
commit | f00a7c6907652ffaba77618d201bc144c25a7d2c (patch) | |
tree | 4b5b8a9df586b37624a74d38fc64a205e5082b24 | |
parent | a63456be33e31d785f4cc570a13bbd2757316073 (diff) | |
download | simpl-f00a7c6907652ffaba77618d201bc144c25a7d2c.tar.gz simpl-f00a7c6907652ffaba77618d201bc144c25a7d2c.tar.bz2 simpl-f00a7c6907652ffaba77618d201bc144c25a7d2c.zip |
[plot] Don't plot partials that are changing to
0 frequency (killed in SMSPartialTracking).
-rw-r--r-- | simpl/plot/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/simpl/plot/__init__.py b/simpl/plot/__init__.py index 375c50b..aa8bebf 100644 --- a/simpl/plot/__init__.py +++ b/simpl/plot/__init__.py @@ -41,7 +41,8 @@ def plot_partials(frames, show_peaks=False): y = [frames[n].partials[p].frequency, frames[n + 1].partials[p].frequency] amp = frames[n].partials[p].amplitude - if amp: + freq = frames[n + 1].partials[p].frequency + if amp and freq: plt.plot(x, y, color=colours.pbj(amp / max_amp)) if show_peaks: |