Title: [Bug]: moving ticks to the top or left with tick_params makes get_ticks_position return "unknown" · Issue #21337 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: moving ticks to the top or left with tick_params makes get_ticks_position return "unknown" · Issue #21337 · matplotlib/matplotlib
X Title: [Bug]: moving ticks to the top or left with tick_params makes get_ticks_position return "unknown" · Issue #21337 · matplotlib/matplotlib
Description: Bug summary See title. Code for reproduction from pylab import * rcdefaults() rcParams.update({ "xtick.top": 1, "xtick.labeltop": 1, "xtick.bottom": 0, "xtick.labelbottom": 0, "ytick.right": 1, "ytick.labelright": 1, "ytick.left": 0, "yt...
Open Graph Description: Bug summary See title. Code for reproduction from pylab import * rcdefaults() rcParams.update({ "xtick.top": 1, "xtick.labeltop": 1, "xtick.bottom": 0, "xtick.labelbottom": 0, "ytick.right": 1, "yt...
X Description: Bug summary See title. Code for reproduction from pylab import * rcdefaults() rcParams.update({ "xtick.top": 1, "xtick.labeltop": 1, "xtick.bottom": 0, "xtick.lab...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/21337
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: moving ticks to the top or left with tick_params makes get_ticks_position return \"unknown\"","articleBody":"### Bug summary\n\nSee title.\n\n### Code for reproduction\n\n```python\nfrom pylab import *\r\n\r\nrcdefaults()\r\nrcParams.update({\r\n \"xtick.top\": 1, \"xtick.labeltop\": 1, \"xtick.bottom\": 0, \"xtick.labelbottom\": 0,\r\n \"ytick.right\": 1, \"ytick.labelright\": 1, \"ytick.left\": 0, \"ytick.labelleft\": 0,})\r\nax = figure().add_subplot()\r\nax.figure.canvas.draw()\r\nprint(ax.xaxis.get_ticks_position(), ax.yaxis.get_ticks_position())\r\n\r\nrcdefaults()\r\nax = figure().add_subplot()\r\nax.xaxis.tick_top()\r\nax.yaxis.tick_right()\r\nax.figure.canvas.draw()\r\nprint(ax.xaxis.get_ticks_position(), ax.yaxis.get_ticks_position())\r\n\r\nrcdefaults()\r\nax = figure().add_subplot()\r\ngca().tick_params(top=True, labeltop=True, bottom=False, labelbottom=False,\r\n right=True, labelright=True, left=False, labelleft=False)\r\nax.figure.canvas.draw()\r\nprint(ax.xaxis.get_ticks_position(), ax.yaxis.get_ticks_position())\r\n\r\nshow()\n```\n\n\n### Actual outcome\n\n```\r\ntop right\r\ntop right\r\nunknown unknown\r\n```\n\n### Expected outcome\n\nThe last method for moving ticks should also make get_ticks_position() return \"top\"/\"right\".\n\n### Operating system\n\nlinux\n\n### Matplotlib Version\n\n3.5.0.dev2254+g97ba9d41ef\n\n### Matplotlib Backend\n\nany\n\n### Python version\n\n3.9\n\n### Jupyter version\n\nno\n\n### Other libraries\n\n_No response_\n\n### Installation\n\n_No response_\n\n### Conda channel\n\n_No response_","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2021-10-11T14:09:54.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/21337/matplotlib/issues/21337"}
| 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:94a9c024-4afd-1091-2289-b975d7e0dfb9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4A2:3A401E:4522AC:5D8D23:6A529253 |
| html-safe-nonce | 85c3f1a05b57e48497a9a18519acdfb9a552168381e6435184b0abadbb210143 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEEyOjNBNDAxRTo0NTIyQUM6NUQ4RDIzOjZBNTI5MjUzIiwidmlzaXRvcl9pZCI6IjQ1OTc0ODEyNjYyODMxODg4MTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 375e1903f98a7bf683d4ae05b8c7c57fd622eda566696713acb6e02b5822952b |
| hovercard-subject-tag | issue:1022753763 |
| 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/21337/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ade742cb193c27fad799c67b29c0f2ab05a045ddb4fd4916a539ec424fa81d8d/matplotlib/matplotlib/issues/21337 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ade742cb193c27fad799c67b29c0f2ab05a045ddb4fd4916a539ec424fa81d8d/matplotlib/matplotlib/issues/21337 |
| og:image:alt | Bug summary See title. Code for reproduction from pylab import * rcdefaults() rcParams.update({ "xtick.top": 1, "xtick.labeltop": 1, "xtick.bottom": 0, "xtick.labelbottom": 0, "ytick.right": 1, "yt... |
| 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 | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width