Title: [Bug]: possible regression in axis ticks handling in matplotlib 3.6.0rc2 · Issue #23806 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: possible regression in axis ticks handling in matplotlib 3.6.0rc2 · Issue #23806 · matplotlib/matplotlib
X Title: [Bug]: possible regression in axis ticks handling in matplotlib 3.6.0rc2 · Issue #23806 · matplotlib/matplotlib
Description: Bug summary While running image tests for yt, I noticed a change of behaviour that bisects to 2357c92d87d96d519c8470776e76180e71663d0b (PR #22587) and that I'm not 100% sure is intentional, where parameters set with Axis.tick_params are ...
Open Graph Description: Bug summary While running image tests for yt, I noticed a change of behaviour that bisects to 2357c92d87d96d519c8470776e76180e71663d0b (PR #22587) and that I'm not 100% sure is intentional, where p...
X Description: Bug summary While running image tests for yt, I noticed a change of behaviour that bisects to 2357c92d87d96d519c8470776e76180e71663d0b (PR #22587) and that I'm not 100% sure is intentional, whe...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/23806
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: possible regression in axis ticks handling in matplotlib 3.6.0rc2","articleBody":"### Bug summary\r\n\r\nWhile running image tests for yt, I noticed a change of behaviour that bisects to \r\n[2357c92d87d96d519c8470776e76180e71663d0b](https://github.com/matplotlib/matplotlib/commit/2357c92d87d96d519c8470776e76180e71663d0b) (PR #22587)\r\nand that I'm not 100% sure is intentional, where parameters set with `Axis.tick_params` are forgotten after a call to `Axes.cla`.\r\n\r\nIn yt we use persistent `Axis` instances inside container classes; we typically set some `tick_params` during instantiation of the container, and defer rendering as much as possible, at which point `Axis` instances may be cleared before the plot is drawn again.\r\n\r\nI think this can easily be fixed in yt, but I wanted to check with you wether this change was intented or not.\r\n\r\n\r\n### Code for reproduction\r\n\r\n```python\r\nimport matplotlib as mpl\r\nimport matplotlib.pyplot as plt\r\n\r\nfig, ax = plt.subplots()\r\nax.tick_params(which=\"both\", axis=\"both\", direction=\"in\", top=True, right=True)\r\nax.cla()\r\nfig.savefig(f\"/tmp/{mpl.__version__}.png\")\r\n```\r\n\r\n\r\n### Actual outcome\r\n\r\n\r\n\r\n\r\n### Expected outcome\r\n\r\nwith matplotlib 3.5\r\n\r\n\r\n\r\n### Additional information\r\n\r\n_No response_\r\n\r\n### Operating system\r\n\r\nN/A\r\n\r\n### Matplotlib Version\r\n\r\n3.6 VS 3.5\r\n\r\n### Matplotlib Backend\r\n\r\nMacOSX (but also seeing this on a Linux CI server)\r\n\r\n### Python version\r\n\r\n3.10.4\r\n\r\n### Jupyter version\r\n\r\nN/A\r\n\r\n### Installation\r\n\r\npip","author":{"url":"https://github.com/neutrinoceros","@type":"Person","name":"neutrinoceros"},"datePublished":"2022-09-05T17:14:48.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/23806/matplotlib/issues/23806"}
| 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:55b321da-2b28-f26a-7980-009f4bd05690 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A860:C1E1E:C4A91E:1081ED4:6A528789 |
| html-safe-nonce | 500f316183cf9f976655f48c2073aa5cdf7c5a8ccf7bf2476cff7cad2da05b61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODYwOkMxRTFFOkM0QTkxRToxMDgxRUQ0OjZBNTI4Nzg5IiwidmlzaXRvcl9pZCI6IjkzODg1MTk1Njg3NjgwNjAyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49821c6eee7a7072855d8200d8a400c2834f9f32113f54b19079d6f086351900 |
| hovercard-subject-tag | issue:1362309761 |
| 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/23806/issue_layout |
| twitter:image | https://opengraph.githubassets.com/85e784ccd4c9e7536280cc8f74ecc021503fa9907bf8df6ffce37fadaaff2fb6/matplotlib/matplotlib/issues/23806 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/85e784ccd4c9e7536280cc8f74ecc021503fa9907bf8df6ffce37fadaaff2fb6/matplotlib/matplotlib/issues/23806 |
| og:image:alt | Bug summary While running image tests for yt, I noticed a change of behaviour that bisects to 2357c92d87d96d519c8470776e76180e71663d0b (PR #22587) and that I'm not 100% sure is intentional, where p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | neutrinoceros |
| 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