summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--simpl/plot/__init__.py3
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: