Commit fc6090e
committed
Fix leaking matplotlib figure (#2771)
Summary:
In StreamWriter basic usage tutorial, matplotlib is used to generate raster images of waveforms, and the figure used is left unshown in the resulting tutorial with the use of ``sphinx_gallery_defer_figures`` command.
It turned out that this figure is shown in the next code block executed by Sphinx Gallery, and the figure is placed in totally unrelated place. https://pytorch.org/audio/main/tutorials/audio_feature_extractions_tutorial.html
<img width="951" alt="Screen Shot 2022-10-14 at 10 06 58 PM" src="https://user-images.githubusercontent.com/855818/195855124-ecd9be49-5085-4acd-9a93-608d9d1ee9ce.png">
This commit fixes it by closing the figure.
Pull Request resolved: #2771
Reviewed By: nateanl
Differential Revision: D40382076
Pulled By: mthrok
fbshipit-source-id: 015f2bab8492d3b4fbe70e1174c7776a5aa2679a1 parent 55c695b commit fc6090e
1 file changed
+1
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
657 | | - | |
| 657 | + | |
658 | 658 | | |
659 | 659 | | |
660 | 660 | | |
| |||
667 | 667 | | |
668 | 668 | | |
669 | 669 | | |
670 | | - | |
671 | | - | |
672 | 670 | | |
673 | 671 | | |
674 | 672 | | |
| |||
0 commit comments