Skip to content

Commit 8be00ae

Browse files
authored
Update seaborn-new.rst
1 parent 46803ac commit 8be00ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/day3/seaborn-new.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Showing your figure
218218
"""""""""""""""""""
219219

220220
* In an IDE, this is trivial: just assign your plotting command to a variable, and call ``.figure.show()`` off of that variable name.
221-
* In a script to be executed from the command line, you may as well use ``plt.show()`` because you still have to do ``import matplotlib`` and set ``matplotlib.use('TkAgg')`` or another backend to make the display open. Moreover, while ``plt.show()`` keeps the script from terminating until the user closes the graphic, for some reason ``.figure.show()`` does not, so the figure closes almost immediately after opening UNLESS you do one of the following:
221+
* In a script to be executed from the command line, you may as well use ``plt.show()`` because you typically still have to do ``import matplotlib`` and set ``matplotlib.use('TkAgg')`` or another backend to make the display open. Moreover, while ``plt.show()`` keeps the script from terminating until the user closes the graphic, for some reason ``.figure.show()`` does not, so the figure closes almost immediately after opening UNLESS you do one of the following:
222222
- After the line containing ``.figure.show()``, add an ``input()`` command, something like ``input("Press any key to exit")``.
223223
- Run the script with the interactive ``-i`` option between ``python`` and the name of the script. Note that with this method, you will step into a Python shell after closing the figure.
224224

0 commit comments

Comments
 (0)