Skip to content

Commit dcedbc4

Browse files
committed
Fix for MIT-LCP/wfdb-python issue MIT-LCP#269. The number of subplots (n_subplots) should match the number of ylabels regardless of whether records or annotations are being passed in.
1 parent 323a0f0 commit dcedbc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

wfdb/plot/plot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ def plot_items(signal=None, ann_samp=None, ann_sym=None, fs=None,
128128
'signal: {} values'.format(signal.shape[1]))
129129

130130
if ylabel:
131-
if len(ylabel) != signal.shape[1]:
131+
if len(ylabel) != n_subplots:
132132
raise Exception('The length of the ylabel must be the same as the '
133-
'signal: {} values'.format(signal.shape[1]))
133+
'signal: {} values'.format(n_subplots))
134134

135135
label_figure(axes, n_subplots, time_units, sig_name, sig_units,
136136
xlabel, ylabel, title)

0 commit comments

Comments
 (0)