Skip to content

Commit

Permalink
fix: adapt frequency axes for low sampling frequency
Browse files Browse the repository at this point in the history
  • Loading branch information
fhchl committed Sep 30, 2019
1 parent 0b03301 commit 412e28a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions response.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,8 @@ def plot_magnitude(
ax.grid(True)

if flim is None:
flim = (10, self.fs / 2)
lowlim = min(10, self.fs / 2 / 100)
flim = (lowlim, self.fs / 2)
ax.set_xlim(flim)

if dblim is not None:
Expand Down Expand Up @@ -427,7 +428,8 @@ def plot_phase(
ax.grid(True)

if flim is None:
flim = (10, self.fs / 2)
lowlim = min(10, self.fs / 2 / 100)
flim = (lowlim, self.fs / 2)
ax.set_xlim(flim)
if ylim:
ax.set_ylim(ylim)
Expand Down Expand Up @@ -525,7 +527,8 @@ def plot_group_delay(
ax.grid(True)

if flim is None:
flim = (10, self.fs / 2)
lowlim = min(10, self.fs / 2 / 100)
flim = (lowlim, self.fs / 2)
ax.set_xlim(flim)

if ylim:
Expand Down

0 comments on commit 412e28a

Please sign in to comment.