Title: Support passing xticks/yticks when constructing secondary_axis. by anntzer · Pull Request #30367 · matplotlib/matplotlib · GitHub
Open Graph Title: Support passing xticks/yticks when constructing secondary_axis. by anntzer · Pull Request #30367 · matplotlib/matplotlib
X Title: Support passing xticks/yticks when constructing secondary_axis. by anntzer · Pull Request #30367 · matplotlib/matplotlib
Description: Previously, passing xticks to a secondary_xaxis call, or similarly yticks to secondary_yaxis (see added test), would get silently ignored, because the set ticks would get overwritten in _set_scale (called by set_functions). Fix that by toggling the secax._ticks_set private flag, which already exists for that purpose in set_ticks. While at it, also simplify the implementation of set_ticks by relying on functools.wraps to copy the relevant signature. PR summary PR checklist "closes #0000" is in the body of the PR description to link the related issue new and changed code is tested Plotting related features are demonstrated in an example New Features and API Changes are noted with a directive and release note Documentation complies with general and docstring guidelines
Open Graph Description: Previously, passing xticks to a secondary_xaxis call, or similarly yticks to secondary_yaxis (see added test), would get silently ignored, because the set ticks would get overwritten in _set_scale ...
X Description: Previously, passing xticks to a secondary_xaxis call, or similarly yticks to secondary_yaxis (see added test), would get silently ignored, because the set ticks would get overwritten in _set_scale ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/30367
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:70cad892-50fb-9cfc-6157-0457f6faaaa2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C72A:1187B3:2ECFBBF:3FFB5FB:6A53E2EA |
| html-safe-nonce | 79cc51b78bd78cd470fa3a2f4e7a7f67201eec3a676a9a7e590327360ceb82e8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNzJBOjExODdCMzoyRUNGQkJGOjNGRkI1RkI6NkE1M0UyRUEiLCJ2aXNpdG9yX2lkIjoiNzk5MjA5NzI3ODE0NzE1ODc2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e28e37c7babcda5d55cddb3a335c1c0d6e7d571ab3e4a10b732d599631eead9f |
| hovercard-subject-tag | pull_request:2704092738 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/pull/30367/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | Previously, passing xticks to a secondary_xaxis call, or similarly yticks to secondary_yaxis (see added test), would get silently ignored, because the set ticks would get overwritten in _set_scale ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| 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