Skip to content

Commit

Permalink
Updated freq_str in plot_spectrogram() as 's' of pd.Timedelta is now …
Browse files Browse the repository at this point in the history
…preferred over 'S'

Signed-off-by: S.J. Guillot <58807831+sjg2203@users.noreply.github.com>
  • Loading branch information
sjg2203 committed Apr 5, 2024
1 parent 8e11879 commit 553814a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yasa/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def plot_spectrogram(

if hypno is not None:
# Convert sampling frequency to pandas timefrequency string (e.g., "30s")
freq_str = pd.tseries.frequencies.to_offset(pd.Timedelta(1 / sf, "S")).freqstr
freq_str = pd.tseries.frequencies.to_offset(pd.Timedelta(1 / sf, "s")).freqstr
# Create Hypnogram instance for plotting
hyp = Hypnogram(hypno_int_to_str(hypno), freq=freq_str)
hypnoplot_kwargs = dict(lw=1.5, fill_color=None)
Expand Down

0 comments on commit 553814a

Please sign in to comment.