Title: [Bug]: Axes.clear does not reset axislabel or ticklabel sizes · Issue #21239 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: Axes.clear does not reset axislabel or ticklabel sizes · Issue #21239 · matplotlib/matplotlib
X Title: [Bug]: Axes.clear does not reset axislabel or ticklabel sizes · Issue #21239 · matplotlib/matplotlib
Description: Bug summary After clear()ing an Axes, custom axislabel or ticklabel sizes persist. Code for reproduction from pylab import * ax = gca(); ax.set_xlabel("foo", size=16); ax.tick_params(labelsize=16); ax.clear(); ax.set_xlabel("foo") Actual...
Open Graph Description: Bug summary After clear()ing an Axes, custom axislabel or ticklabel sizes persist. Code for reproduction from pylab import * ax = gca(); ax.set_xlabel("foo", size=16); ax.tick_params(labelsize=16);...
X Description: Bug summary After clear()ing an Axes, custom axislabel or ticklabel sizes persist. Code for reproduction from pylab import * ax = gca(); ax.set_xlabel("foo", size=16); ax.tick_params(labe...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21239
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: Axes.clear does not reset axislabel or ticklabel sizes","articleBody":"### Bug summary\r\n\r\nAfter clear()ing an Axes, custom axislabel or ticklabel sizes persist.\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nfrom pylab import *\r\nax = gca(); ax.set_xlabel(\"foo\", size=16); ax.tick_params(labelsize=16); ax.clear(); ax.set_xlabel(\"foo\")\r\n```\r\n\r\n### Actual outcome\r\n\r\n\r\n\r\n### Expected outcome\r\n\r\nThe axislabel and ticklabels revert to the default size. (I think that's a saner behavior? Otherwise we should properly document what clear() resets and what it doesn't.)\r\n\r\n### Operating system\r\n\r\narchlinux\r\n\r\n### Matplotlib Version\r\n\r\n3.5.0.dev2168+g3b7b3a5a6f\r\n\r\n### Matplotlib Backend\r\n\r\nany\r\n\r\n### Python version\r\n\r\n39\r\n\r\n### Jupyter version\r\n\r\n_No response_\r\n\r\n### Other libraries\r\n\r\n_No response_\r\n\r\n### Installation\r\n\r\n_No response_\r\n\r\n### Conda channel\r\n\r\n_No response_","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2021-09-30T22:20:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/21239/matplotlib/issues/21239"}
| 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:0aa73edc-d4e4-01af-a8ec-53758977ca2b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A82:28B0A3:34C625:47483E:6A5271BC |
| html-safe-nonce | ec18ad5c2d809fa58d3fb411f3a0c6f85afb994f9c8c58196f49dd09111ea6b2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTgyOjI4QjBBMzozNEM2MjU6NDc0ODNFOjZBNTI3MUJDIiwidmlzaXRvcl9pZCI6IjY0MDg1MzU0MjcyOTMyNzg2NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 111c626f4c56be5df8b5e139bc183aabb667ebb6fe597ea481489a1bfc139f47 |
| hovercard-subject-tag | issue:1012675202 |
| 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/21239/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bf6abf80910fbf25f2c254c4aa833562237a1a0306d7a51f87c69583d1438663/matplotlib/matplotlib/issues/21239 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bf6abf80910fbf25f2c254c4aa833562237a1a0306d7a51f87c69583d1438663/matplotlib/matplotlib/issues/21239 |
| og:image:alt | Bug summary After clear()ing an Axes, custom axislabel or ticklabel sizes persist. Code for reproduction from pylab import * ax = gca(); ax.set_xlabel("foo", size=16); ax.tick_params(labelsize=16);... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | anntzer |
| 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 | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width