| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| Expand Up | @@ -2614,12 +2614,16 @@ def show(self, warn=True): | |
| may only be shown briefly or not shown at all if you or your | ||
| environment are not managing an event loop. | ||
|
|
||
| Proper use cases for `.Figure.show` include running this from a | ||
| GUI application or an IPython shell. | ||
|
|
||
| If you're running a pure python shell or executing a non-GUI | ||
| python script, you should use `matplotlib.pyplot.show` instead, | ||
| which takes care of managing the event loop for you. | ||
| Proper use cases for `.Figure.show` include running this from a GUI | ||
| application (where there is persistently an event loop running) or | ||
| from a shell with in input hook configured (IPython will do this). | ||
| Some, but not all, GUI toolkits will register an input hook on | ||
| import. See :ref:`cp_integration` for more details. | ||
|
Comment thread
Outdated
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityMy apologies, but I find these changes much more confusing than the original. What is an "input hook"? What is a "GUI toolkit", and why do they register an "input hook"? Where do they register it? and what does "on import" mean? On import of what?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityNote that there is a typo in the previous paragraph "an GUI even loop"...
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityIt does include a link to the (much) longer explanation. #22169 noted that they found a case where it did work. The goal was to add a few more details about when you should expect this to work or not.
Sorry, something went wrong.
All reactions
|
||
|
|
||
| If you're in a shell without input hook integration or executing a | ||
| python script, you should use `matplotlib.pyplot.show` with | ||
| ``block=True`` instead, which takes care of starting and running | ||
|
Comment thread
Copy link
Copy Markdown
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Qualityblock=True is the default?
Sorry, something went wrong.
All reactions
Copy link
Copy Markdown
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low QualityThe default depends on if we are in "interactive mode" or not.
Sorry, something went wrong.
All reactions
|
||
| the event loop for you. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| Expand Down | ||
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.