sysplot.plot_filter_tolerance#

plot_filter_tolerance(ax, bands, A_pass, A_stop, w_max, mag_to_db=False, show_mask=True, show_arrows=True, show_labels=False, set_ticks=True, arrow_y=-0.2, alpha=None)[source]#

Draw a filter power tolerance mask on an existing axes.

Shades the forbidden regions of a filter specification. Each entry in bands is a dict with the following keys:

  • "type": "pass", "stop", or "transition"

  • "w0": lower frequency bound

  • "w1": upper frequency bound

  • "label" (optional): band annotation text

  • "w0_label" / "w1_label" (optional): tick label overrides

Note

Axis y-limits must be set before calling this function, as the forbidden-region patches are sized from the current limits.

Parameters:
  • ax (Axes) – Axes to draw on.

  • bands (list[dict]) – List of band specification dicts (see above).

  • A_pass (float) – Lower passband power bound (A_D²).

  • A_stop (float) – Upper stopband power bound (A_S²).

  • w_max (float) – Maximum frequency for the x-axis.

  • mag_to_db (bool) – If True, converts power bounds to dB before plotting.

  • show_mask (bool) – If True, shades the forbidden regions.

  • show_arrows (bool) – If True, draws double-headed arrows with band labels below the axis.

  • show_labels (bool) – If True, adds legend labels to the shaded patches.

  • set_ticks (bool) – If True, sets frequency and amplitude tick marks from the band definitions.

  • arrow_y (float) – Vertical position of band arrows in axes coordinates. Default is -0.2.

  • alpha (float | None) – Opacity of shaded regions. Defaults to filter_tolerance_alpha.

Return type:

None

Examples using sysplot.plot_filter_tolerance#

Plot Filter Tolerance

Plot Filter Tolerance
rtype:

None