@@ -249,17 +249,17 @@ def plot_items(
249
249
signal = _expand_channels (signal )
250
250
251
251
# Figure out number of subplots required
252
- sig_len , n_sig , n_annot , n_subplots = get_plot_dims (signal , ann_samp )
252
+ sig_len , n_sig , n_annot , n_subplots = _get_plot_dims (signal , ann_samp )
253
253
254
254
# Convert sampling_freq and ann_freq to lists if needed
255
255
sampling_freq = _get_sampling_freq (sampling_freq , n_sig , fs )
256
256
ann_freq = _get_ann_freq (ann_freq , n_annot , fs )
257
257
258
258
# Create figure
259
- fig , axes = create_figure (n_subplots , sharex , sharey , figsize )
259
+ fig , axes = _create_figure (n_subplots , sharex , sharey , figsize )
260
260
try :
261
261
if signal is not None :
262
- plot_signal (
262
+ _plot_signal (
263
263
signal ,
264
264
sig_len ,
265
265
n_sig ,
@@ -271,7 +271,7 @@ def plot_items(
271
271
)
272
272
273
273
if ann_samp is not None :
274
- plot_annotation (
274
+ _plot_annotation (
275
275
ann_samp ,
276
276
n_annot ,
277
277
ann_sym ,
@@ -286,7 +286,7 @@ def plot_items(
286
286
)
287
287
288
288
if ecg_grids :
289
- plot_ecg_grids (
289
+ _plot_ecg_grids (
290
290
ecg_grids ,
291
291
fs ,
292
292
sig_units ,
@@ -311,7 +311,7 @@ def plot_items(
311
311
"signal: {} values" .format (n_subplots )
312
312
)
313
313
314
- label_figure (
314
+ _label_figure (
315
315
axes ,
316
316
n_subplots ,
317
317
time_units ,
@@ -334,7 +334,7 @@ def plot_items(
334
334
plt .show ()
335
335
336
336
337
- def get_plot_dims (signal , ann_samp ):
337
+ def _get_plot_dims (signal , ann_samp ):
338
338
"""
339
339
Figure out the number of plot channels.
340
340
@@ -393,7 +393,7 @@ def get_plot_dims(signal, ann_samp):
393
393
return sig_len , n_sig , n_annot , max (n_sig , n_annot )
394
394
395
395
396
- def create_figure (n_subplots , sharex , sharey , figsize ):
396
+ def _create_figure (n_subplots , sharex , sharey , figsize ):
397
397
"""
398
398
Create the plot figure and subplot axes.
399
399
@@ -425,7 +425,7 @@ def create_figure(n_subplots, sharex, sharey, figsize):
425
425
return fig , axes
426
426
427
427
428
- def plot_signal (
428
+ def _plot_signal (
429
429
signal , sig_len , n_sig , fs , time_units , sig_style , axes , sampling_freq = None
430
430
):
431
431
"""
@@ -503,7 +503,7 @@ def plot_signal(
503
503
axes [ch ].plot (t , signal [ch ], sig_style [ch ], zorder = 3 )
504
504
505
505
506
- def plot_annotation (
506
+ def _plot_annotation (
507
507
ann_samp ,
508
508
n_annot ,
509
509
ann_sym ,
@@ -625,7 +625,7 @@ def plot_annotation(
625
625
)
626
626
627
627
628
- def plot_ecg_grids (ecg_grids , fs , units , time_units , axes , sampling_freq = None ):
628
+ def _plot_ecg_grids (ecg_grids , fs , units , time_units , axes , sampling_freq = None ):
629
629
"""
630
630
Add ECG grids to the axes.
631
631
@@ -668,7 +668,7 @@ def plot_ecg_grids(ecg_grids, fs, units, time_units, axes, sampling_freq=None):
668
668
minor_ticks_x ,
669
669
major_ticks_y ,
670
670
minor_ticks_y ,
671
- ) = calc_ecg_grids (
671
+ ) = _calc_ecg_grids (
672
672
auto_ylims [0 ],
673
673
auto_ylims [1 ],
674
674
units [ch ],
@@ -702,7 +702,7 @@ def plot_ecg_grids(ecg_grids, fs, units, time_units, axes, sampling_freq=None):
702
702
axes [ch ].set_ylim (auto_ylims )
703
703
704
704
705
- def calc_ecg_grids (minsig , maxsig , sig_units , fs , maxt , time_units ):
705
+ def _calc_ecg_grids (minsig , maxsig , sig_units , fs , maxt , time_units ):
706
706
"""
707
707
Calculate tick intervals for ECG grids.
708
708
@@ -779,7 +779,7 @@ def calc_ecg_grids(minsig, maxsig, sig_units, fs, maxt, time_units):
779
779
return (major_ticks_x , minor_ticks_x , major_ticks_y , minor_ticks_y )
780
780
781
781
782
- def label_figure (
782
+ def _label_figure (
783
783
axes , n_subplots , time_units , sig_name , sig_units , xlabel , ylabel , title
784
784
):
785
785
"""
@@ -942,7 +942,7 @@ def plot_wfdb(
942
942
ylabel ,
943
943
record_name ,
944
944
sig_units ,
945
- ) = get_wfdb_plot_items (
945
+ ) = _get_wfdb_plot_items (
946
946
record = record , annotation = annotation , plot_sym = plot_sym
947
947
)
948
948
@@ -980,7 +980,7 @@ def plot_wfdb(
980
980
)
981
981
982
982
983
- def get_wfdb_plot_items (record , annotation , plot_sym ):
983
+ def _get_wfdb_plot_items (record , annotation , plot_sym ):
984
984
"""
985
985
Get items to plot from WFDB objects.
986
986
0 commit comments