Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/contribute/template_gallery.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"%matplotlib ipympl\n",
"\n",
"plt.figure()\n",
"pf.plot.time(noise)"
"pf.plot.time(noise)\n",
"plt.show()"
]
},
{
Expand Down
4 changes: 3 additions & 1 deletion docs/contribute/template_oer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"source": [
"import pyfar as pf\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
},
Expand Down Expand Up @@ -204,7 +205,8 @@
"with open(odie.fetch(fnames[1])) as f:\n",
" print(f.read())\n",
"\n",
"pf.plot.time(audio_data)"
"pf.plot.time(audio_data)\n",
"plt.show()"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@mberz mberz Oct 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I remember this notebook does not get executed (and is not intended to), but statically rendered, in which case there's also not going to be a plot output.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also remember that this was on purpose.
But i just realized that the latest template-notebook is stored in closed-educational and that #107 is still open.

]
},
{
Expand Down
20 changes: 13 additions & 7 deletions docs/gallery/interactive/fast_fourier_transform.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@
"\n",
"ax.set_title(\"'none'\")\n",
"ax.set_ylim(-20, 70)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand All @@ -197,7 +198,8 @@
"\n",
"ax.set_title(\"'unitary'\")\n",
"ax.set_ylim(-20, 70)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand All @@ -224,7 +226,8 @@
"\n",
"ax.set_title(\"'amplitude'\")\n",
"ax.set_ylim(-80, 10)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand All @@ -251,7 +254,8 @@
"\n",
"ax.set_title(\"'rms'\")\n",
"ax.set_ylim(-80, 10)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand All @@ -278,7 +282,8 @@
"\n",
"ax.set_title(\"'power'\")\n",
"ax.set_ylim(-80, 10)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -309,7 +314,8 @@
"\n",
"ax.set_title(\"'psd'\")\n",
"ax.set_ylim(-80, 10)\n",
"ax.legend(loc='upper left')"
"ax.legend(loc='upper left')\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -380,7 +386,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.10.16"
}
},
"nbformat": 4,
Expand Down
34 changes: 22 additions & 12 deletions docs/gallery/interactive/pyfar_filter_types.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"y = pf.dsp.filter.elliptic(impulse, N, 1, 60, frequency, btype=btype)\n",
"pf.plot.freq(y * 10**(-20/20), label='Elliptic')\n",
"\n",
"ax.legend(loc='lower right');"
"ax.legend(loc='lower right')\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -94,7 +95,8 @@
"y = pf.dsp.filter.elliptic(impulse, N, 1, 60, frequency, btype=btype)\n",
"pf.plot.freq(y * 10**(-20/20), label='Elliptic')\n",
"\n",
"ax.legend(loc='lower left');"
"ax.legend(loc='lower left')\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -128,7 +130,8 @@
"y = pf.dsp.filter.elliptic(impulse, N, 1, 60, frequency, btype=btype)\n",
"pf.plot.freq(y * 10**(-20/20), label='Elliptic')\n",
"\n",
"ax.legend();"
"ax.legend()\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -162,7 +165,8 @@
"y = pf.dsp.filter.elliptic(impulse, N, 1, 60, frequency, btype=btype)\n",
"pf.plot.freq(y * 10**(-20/20), label='Elliptic')\n",
"\n",
"ax.legend(loc='lower left');"
"ax.legend(loc='lower left')\n",
"plt.show()"
]
},
{
Expand All @@ -186,7 +190,8 @@
"ax = pf.plot.freq(y, label=['low-pass', 'high-pass'])\n",
"pf.plot.freq(y[0] + y[1], color=[0, 0, 0, .5], linestyle='--', label='sum')\n",
"\n",
"ax.legend(loc='lower left');"
"ax.legend(loc='lower left')\n",
"plt.show()"
]
},
{
Expand All @@ -210,7 +215,8 @@
"source": [
"y = pf.dsp.filter.fractional_octave_bands(impulse, 1, frequency_range=(60, 12e3))\n",
"ax = pf.plot.freq(y)\n",
"ax.set_ylim(-60, 5);"
"ax.set_ylim(-60, 5)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -238,7 +244,8 @@
"source": [
"y, *_ = pf.dsp.filter.reconstructing_fractional_octave_bands(impulse, 1)\n",
"ax = pf.plot.freq(y)\n",
"ax.set_ylim(-60, 5);"
"ax.set_ylim(-60, 5)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -267,7 +274,8 @@
"gtf = pf.dsp.filter.GammatoneBands((20, 20e3))\n",
"y, _ = gtf.process(impulse)\n",
"ax = pf.plot.freq(y)\n",
"ax.set_ylim(-60, 5);"
"ax.set_ylim(-60, 5)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -314,7 +322,8 @@
"pf.plot.freq(y, label='Notch')\n",
"\n",
"ax.set_ylim(-100, 20)\n",
"ax.legend(loc='lower left', ncol=2);"
"ax.legend(loc='lower left', ncol=2)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -348,7 +357,8 @@
"pf.plot.freq(y * 10**(-20/20), label=\"Low-shelve cascade\")\n",
"\n",
"ax.set_ylim(-40, 20)\n",
"ax.legend(loc='lower right', ncol=2);"
"ax.legend(loc='lower right', ncol=2)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -381,7 +391,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "gallery",
"display_name": "pyfar",
"language": "python",
"name": "python3"
},
Expand All @@ -395,7 +405,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.9"
"version": "3.13.2"
}
},
"nbformat": 4,
Expand Down
18 changes: 12 additions & 6 deletions docs/gallery/interactive/pyfar_filtering.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"import pyfar as pf\n",
"import numpy as np\n",
"from IPython.display import Audio\n",
"import matplotlib.pyplot as plt\n",
"%matplotlib inline"
]
},
Expand Down Expand Up @@ -46,7 +47,8 @@
"# plot impulse before and after filtering\n",
"ax = pf.plot.time_freq(impulse_low_passed, label='low-passed')\n",
"ax = pf.plot.time_freq(impulse, c=[0, 0, 0, .5], ls='--', label='original')\n",
"ax[1].legend()"
"ax[1].legend()\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -122,7 +124,8 @@
"input_signal = pf.signals.impulse(256)\n",
"output_signal = comb_filter.process(input_signal)\n",
"\n",
"ax = pf.plot.time_freq(output_signal, unit='samples')"
"ax = pf.plot.time_freq(output_signal, unit='samples')\n",
"plt.show()"
]
},
{
Expand All @@ -146,7 +149,8 @@
"# Apply the filter bank to an impulse with a duration of 4096 samples\n",
"impulse_filter_bank, _ = Gammatones.process(pf.signals.impulse(4096))\n",
"ax = pf.plot.freq(impulse_filter_bank)\n",
"ax.set_ylim(-60, 5)"
"ax.set_ylim(-60, 5)\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -190,7 +194,8 @@
"# plotting the time signals of both blocks\n",
"ax = pf.plot.time(block_1, unit='samples', label='block 1')\n",
"pf.plot.time(pf.TimeData(block_2.time, np.arange(128)+128), label='block 2')\n",
"ax.legend()"
"ax.legend()\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -243,7 +248,8 @@
" output_signal.time[:, nn*block_size:(nn+1)*block_size] = block.time\n",
"\n",
"pf.plot.spectrogram(\n",
" output_signal, window_length=block_size, freq_scale='log');"
" output_signal, window_length=block_size, freq_scale='log')\n",
"plt.show()"
]
},
{
Expand Down Expand Up @@ -306,7 +312,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.9"
"version": "3.13.2"
}
},
"nbformat": 4,
Expand Down
3 changes: 2 additions & 1 deletion docs/gallery/interactive/pyfar_interactive_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
"\n",
"pf.plot.use()\n",
"plt.figure()\n",
"pf.plot.time(hrirs)"
"pf.plot.time(hrirs)\n",
"plt.show()"
]
},
{
Expand Down
Loading