Title: [Bug]: Figures fail to redraw with IPython · Issue #23042 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Figures fail to redraw with IPython · Issue #23042 · matplotlib/matplotlib
X Title: [Bug]: Figures fail to redraw with IPython · Issue #23042 · matplotlib/matplotlib
Description: Bug summary A regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is added using the pyplot interface in an interactive IPython session. This has been observed with both pyplot.plot ...
Open Graph Description: Bug summary A regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is added using the pyplot interface in an interactive IPython session. This ...
X Description: Bug summary A regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is added using the pyplot interface in an interactive IPython session. This ...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23042
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Figures fail to redraw with IPython","articleBody":"### Bug summary\n\nA regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is added using the `pyplot` interface in an interactive IPython session. This has been observed with both `pyplot.plot` and `pyplot.tripcolor`. The figure will show the first plot drawn, but subsequent calls to `pyplot.plot` and `pyplot.tripcolor` fail to update an on-screen figure until `pyplot.draw` is invoked. This has been observed with IPython versions 8.3.0 (current) and 8.2.0.\r\n\r\nBoth the Qt5 and Tk backends exhibit the same issues.\n\n### Code for reproduction\n\n```python\n# Install matplotlib and ipython in a virtualenv\r\npython3 -m venv ~/mpl.venv\r\n. ~/mpl.venv/bin/activate\r\npip install matplotlib ipython\r\n\r\n# Make sure to start with a clean config\r\nmv ~/.ipython ~/.ipython.backup\r\nmv ~/.config/matplotlib .config/matplotlib.backup\r\n\r\n# Run `pylab`\r\nipython --pylab=tk\r\n\r\n# ... the following are commands issues in the ipython prompt\r\nplot(arange(10))\r\nplot(-arange(10))\r\ndraw()\n```\n\n\n### Actual outcome\n\n1. After the first `plot` command, a figure appears with a `y = x` line shown.\r\n2. After the second `plot` command, the figure does not update.\r\n3. After the `draw` command, the figure updates to show both the `y = x` and `y = -x` lines.\n\n### Expected outcome\n\n1. After the first `plot` command, a figure appears with a `y = x` line shown. (This is as expected.)\r\n2. After the second `plot` command, the figure updates with the addition of a `y = -x` line. (This is the deviation.)\r\n3. The `draw` command should produce no visible change in the figure.\n\n### Additional information\n\nThis regression has been bisected to commit f937b0ab5ef9d5ffe9f2f58f6391357783cc4afa.\r\n\r\nThe testbed is a current Void Linux system running Python 3.10.4, including the system `python3-tkinter` package for a GUI. (As noted above, this bug is also present with the Qt5 backend.) All packages were installed in a virtual environment. The output of `pip freeze` is:\r\n\r\n```\r\nasttokens==2.0.5\r\nbackcall==0.2.0\r\ncycler==0.11.0\r\ndecorator==5.1.1\r\nexecuting==0.8.3\r\nfonttools==4.33.3\r\nipython==8.3.0\r\njedi==0.18.1\r\nkiwisolver==1.4.2\r\nmatplotlib==3.6.0.dev155+gf937b0ab5e\r\nmatplotlib-inline==0.1.3\r\nnumpy==1.22.3\r\npackaging==21.3\r\nparso==0.8.3\r\npexpect==4.8.0\r\npickleshare==0.7.5\r\nPillow==9.1.0\r\nprompt-toolkit==3.0.29\r\nptyprocess==0.7.0\r\npure-eval==0.2.2\r\nPygments==2.12.0\r\npyparsing==3.0.9\r\npython-dateutil==2.8.2\r\nsetuptools-scm==6.4.2\r\nsix==1.16.0\r\nstack-data==0.2.0\r\ntk==0.1.0\r\ntomli==2.0.1\r\ntraitlets==5.2.0\r\nwcwidth==0.2.5\r\n```\r\n(Note that the funny `matplotlib` version comes from a local git repo checked out to the problematic commit.)\n\n### Operating system\n\nVoid Linux x86_64\n\n### Matplotlib Version\n\n3.5.2\n\n### Matplotlib Backend\n\nTkAgg, Qt5Agg\n\n### Python version\n\n3.10.4\n\n### Jupyter version\n\nNone\n\n### Installation\n\npip","author":{"url":"https://github.com/ahesford","@type":"Person","name":"ahesford"},"datePublished":"2022-05-13T02:32:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/23042/matplotlib/issues/23042"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:af04ef89-09d3-984c-de2c-7a9ad903a561 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 94C4:29DE49:C73BEB:108B85D:6A5287AA |
| html-safe-nonce | 0ab257c385c0f908421a5ef5262df98d55bfdc5d4c33fdbfb496c5cfe0f9bfbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NEM0OjI5REU0OTpDNzNCRUI6MTA4Qjg1RDo2QTUyODdBQSIsInZpc2l0b3JfaWQiOiIxMjA3NDA2NTQ5ODQ4OTAyODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 61cccc4653eebe3e39e7807373b70ab3357e00ed77090ba74f77ace6a2e0eb48 |
| hovercard-subject-tag | issue:1234668658 |
| 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/_view_fragments/issues/show/matplotlib/matplotlib/23042/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ca9addc9a879c3018a8e662ef1213a78755d9ae10bd33319ac3c4d343fb03df7/matplotlib/matplotlib/issues/23042 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ca9addc9a879c3018a8e662ef1213a78755d9ae10bd33319ac3c4d343fb03df7/matplotlib/matplotlib/issues/23042 |
| og:image:alt | Bug summary A regression between release versions 3.5.1 and 3.5.2 causes figures to fail to redraw after an initial plot is added using the pyplot interface in an interactive IPython session. This ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ahesford |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| 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