diff options
Diffstat (limited to 'lab-windows/grid_frequency_spectra.ipynb')
-rw-r--r-- | lab-windows/grid_frequency_spectra.ipynb | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/lab-windows/grid_frequency_spectra.ipynb b/lab-windows/grid_frequency_spectra.ipynb index 3d375ef..7b187f5 100644 --- a/lab-windows/grid_frequency_spectra.ipynb +++ b/lab-windows/grid_frequency_spectra.ipynb @@ -141,13 +141,21 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 72, "metadata": {}, "outputs": [ { + "name": "stderr", + "output_type": "stream", + "text": [ + "<ipython-input-72-51d3a7cc1678>:20: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`).\n", + " fig, ax = plt.subplots()\n" + ] + }, + { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "fd94bc97a276400db0539b703c4eeeac", + "model_id": "2991d932b113496a9135d569f9577abe", "version_major": 2, "version_minor": 0 }, @@ -161,10 +169,10 @@ { "data": { "text/plain": [ - "(1.6666666666666667e-05, 0.5)" + "(5e-07, 0.02)" ] }, - "execution_count": 23, + "execution_count": 72, "metadata": {}, "output_type": "execute_result" } @@ -194,8 +202,14 @@ "ax.xaxis.set_major_formatter(plt.FuncFormatter(lambda x, _pos: f'{1/x:.1f}'))\n", "ax.set_xlabel('T in s')\n", "ax.set_ylabel('Amplitude Δf')\n", + "\n", + "for i, t in enumerate([45, 60, 600, 1200, 1800, 3600]):\n", + " ax.axvline(1/t, color='red', alpha=0.5)\n", + " ax.annotate(f'{t} s', xy=(1/t, 3e-3), xytext=(-15, 0), xycoords='data', textcoords='offset pixels', rotation=90)\n", + "#ax.text(1/60, 10,'60 s', ha='left')\n", "ax.grid()\n", - "ax.set_xlim([1/60000, 0.5])" + "ax.set_xlim([1/60000, 0.5])\n", + "ax.set_ylim([5e-7, 2e-2])" ] }, { |