Title: Issue · GitHub
Open Graph Title: Issue · matplotlib/matplotlib
X Title: Issue · matplotlib/matplotlib
Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Open Graph Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
X Description: matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub.
Opengraph URL: https://github.com/matplotlib/matplotlib
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"issue with display hook in base python repl","articleBody":"This only applies to the base `python` repl, everything works in `IPython` repls.\n\nIn discussion on https://github.com/matplotlib/matplotlib/commit/b2fbae76c738d5c24e559b98ed494e9b146c16aa discovered that `sys.displayhook` only gets evaluated for expressions, not statements.\n\nThis means that things like\n\n``` python\nimport numpy\npass\na = b\n```\n\nwill not trigger the auto-redrawing. This is particularly troubling because this mean\n\n``` python\nln, = ax.plot(...)\n```\n\nwill not trigger a re-draw, but\n\n``` python\nax.plot(...)\n```\n\nwill.\n\nDue to b2fbae76c738d5c24e559b98ed494e9b146c16aa, where we rely on the auto-redrawing to trigger the `pyplot` redrawing this means that many `pyplot` workflows in the normal repl are broken (as in things that used to auto-redraw no longer do).\n\nThe options I think are:\n1. figure out how to trigger a call back on statements (if this is possible, it is well hidden. There may be a reason IPython completely re-wrote the execution handling)\n2. say we only support interactive plotting with the IPython repl (which is a major regression)\n3. revert the removal of `draw_if_interactive` which maintains some functions as 'special'\n\nI suspect that the answer is going to be both 2 and 3. normal python shell keeps current functionality and gains _some_ new functionality, IPython picks up lots of new functionality, and the code base keeps this particular wart.\n","author":{"url":"https://github.com/tacaswell","@type":"Person","name":"tacaswell"},"datePublished":"2015-06-08T03:07:45.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/4504/matplotlib/issues/4504"}
| route-pattern | /:user_id/:repository/issues/:id(.:format) |
| route-controller | issues |
| route-action | show |
| fetch-nonce | v2:3418efef-3391-3c84-b7a2-54bbc7a7f31b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCE0:2E411E:18464F0:20D5149:6A535DFA |
| html-safe-nonce | 3eeccc194d0bc9eed6e11c6f5bd699d247f6192b1855e7b7ae9035da8383d075 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0UwOjJFNDExRToxODQ2NEYwOjIwRDUxNDk6NkE1MzVERkEiLCJ2aXNpdG9yX2lkIjoiNDUwMDE4OTM1NTI3NjYxMDUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 0bb3462f552196054bcc90d4294e8212b5cde37f3a391915ca44c7a2d2ddd9f9 |
| hovercard-subject-tag | repository:1385122 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/matplotlib/matplotlib/issues/4504 |
| twitter:image | https://opengraph.githubassets.com/ba4f98366d9861272981f288fc840ec3c0cf43fcb8fa3fba6f2fb9f3783f1c48/matplotlib/matplotlib |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ba4f98366d9861272981f288fc840ec3c0cf43fcb8fa3fba6f2fb9f3783f1c48/matplotlib/matplotlib |
| og:image:alt | matplotlib: plotting with Python. Contribute to matplotlib/matplotlib development by creating an account on GitHub. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-cache |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width