|
125 | 125 | "source": [ |
126 | 126 | "fig, ax = plt.subplots()\n", |
127 | 127 | "ax.scatter(x,y)\n", |
128 | | - "ax.errorbar(x, y, yerr=sigma, fmt=\"o\")" |
| 128 | + "ax.errorbar(x, y, yerr=sigma, fmt=\"o\")\n", |
| 129 | + "# alt-text: a plot showing data points with vertical error bars" |
129 | 130 | ] |
130 | 131 | }, |
131 | 132 | { |
|
214 | 215 | ], |
215 | 216 | "source": [ |
216 | 217 | "ax.plot(x, afit[0] + afit[1]*x + afit[2]*x*x )\n", |
217 | | - "fig" |
| 218 | + "fig\n", |
| 219 | + "# alt-text: a plot showing data points with error bars and a quadratic fit to them" |
218 | 220 | ] |
219 | 221 | }, |
220 | 222 | { |
|
320 | 322 | "source": [ |
321 | 323 | "fig, ax = plt.subplots()\n", |
322 | 324 | "ax.scatter(x,y)\n", |
323 | | - "ax.errorbar(x, y, yerr=sigma, fmt=\"o\", label=\"_nolegend_\")" |
| 325 | + "ax.errorbar(x, y, yerr=sigma, fmt=\"o\", label=\"_nolegend_\")\n", |
| 326 | + "# alt-text: a plot showing a noisy exponential dataset with error bars" |
324 | 327 | ] |
325 | 328 | }, |
326 | 329 | { |
|
402 | 405 | " label=r\"$a_0 = $ %f; $a_1 = $ %f\" % (afit[0], afit[1]))\n", |
403 | 406 | "ax.plot(x, a0_orig*np.exp(a1_orig*x), \":\", label=\"original function\")\n", |
404 | 407 | "ax.legend(numpoints=1, frameon=False)\n", |
405 | | - "fig" |
| 408 | + "fig\n", |
| 409 | + "# alt-text: a plot showing noisy exponential data points, a fit, and the original function" |
406 | 410 | ] |
407 | 411 | }, |
408 | 412 | { |
|
589 | 593 | "source": [ |
590 | 594 | "npts = 128\n", |
591 | 595 | "xx, f = single_freq_sine(npts)\n", |
592 | | - "plot_FFT(xx, f)" |
| 596 | + "plot_FFT(xx, f)\n", |
| 597 | + "# alt-text: a plot with 4 vertical panels showing (1) a sine (2) the Fourier transform of the sine (3) the power in Fourier space (4) the data transformed back to real space" |
593 | 598 | ] |
594 | 599 | }, |
595 | 600 | { |
|
645 | 650 | ], |
646 | 651 | "source": [ |
647 | 652 | "xx, f = single_freq_cosine(npts)\n", |
648 | | - "plot_FFT(xx, f)" |
| 653 | + "plot_FFT(xx, f)\n", |
| 654 | + "# alt-text: a plot with 4 vertical panes showing a single-mode cosine transformed to Fourier space and back" |
649 | 655 | ] |
650 | 656 | }, |
651 | 657 | { |
|
701 | 707 | ], |
702 | 708 | "source": [ |
703 | 709 | "xx, f = single_freq_sine_plus_shift(npts)\n", |
704 | | - "plot_FFT(xx, f)" |
| 710 | + "plot_FFT(xx, f)\n", |
| 711 | + "# alt-text: a plot with 4 vertical panes showing a single-mode sine with a phase shift transformed to Fourier space and back" |
705 | 712 | ] |
706 | 713 | }, |
707 | 714 | { |
|
782 | 789 | "xx, f = two_freq_sine(npts)\n", |
783 | 790 | "\n", |
784 | 791 | "fig, ax = plt.subplots()\n", |
785 | | - "ax.plot(xx, f)" |
| 792 | + "ax.plot(xx, f)\n", |
| 793 | + "# alt-text: a plot showing a two-mode sine wave" |
786 | 794 | ] |
787 | 795 | }, |
788 | 796 | { |
|
847 | 855 | "fig, ax = plt.subplots()\n", |
848 | 856 | "ax.plot(kfreq, fk.real, label=\"real\")\n", |
849 | 857 | "ax.plot(kfreq, fk.imag, \":\", label=\"imaginary\")\n", |
850 | | - "ax.legend(frameon=False)" |
| 858 | + "ax.legend(frameon=False)\n", |
| 859 | + "# alt-text: the FFT of our two-mode sine-wave showing two spikes" |
851 | 860 | ] |
852 | 861 | }, |
853 | 862 | { |
|
915 | 924 | ], |
916 | 925 | "source": [ |
917 | 926 | "fig, ax = plt.subplots()\n", |
918 | | - "ax.plot(xx, fkinv.real)" |
| 927 | + "ax.plot(xx, fkinv.real)\n", |
| 928 | + "# alt-text: a plot of a single-mode sine wave" |
919 | 929 | ] |
920 | 930 | }, |
921 | 931 | { |
|
1278 | 1288 | ], |
1279 | 1289 | "source": [ |
1280 | 1290 | "fig, ax = plt.subplots()\n", |
1281 | | - "ax.plot(x[1:N-1], sol)" |
| 1291 | + "ax.plot(x[1:N-1], sol)\n", |
| 1292 | + "# alt-text: a plot showing a function that looks approximately like -sin(x)" |
1282 | 1293 | ] |
1283 | 1294 | }, |
1284 | 1295 | { |
|
1305 | 1316 | "name": "python", |
1306 | 1317 | "nbconvert_exporter": "python", |
1307 | 1318 | "pygments_lexer": "ipython3", |
1308 | | - "version": "3.13.2" |
| 1319 | + "version": "3.14.2" |
1309 | 1320 | } |
1310 | 1321 | }, |
1311 | 1322 | "nbformat": 4, |
|
0 commit comments