Title: [Bug]: `line.set_color()` not working for ticks · Issue #25522 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: `line.set_color()` not working for ticks · Issue #25522 · matplotlib/matplotlib
X Title: [Bug]: `line.set_color()` not working for ticks · Issue #25522 · matplotlib/matplotlib
Description: Bug summary In this tutorial, line.set_color('green') is used to attempt to make the yticks green, but it doesn't work, including in the output shown in the tutorial. Code for reproduction # plt.figure creates a matplotlib.figure.Figure ...
Open Graph Description: Bug summary In this tutorial, line.set_color('green') is used to attempt to make the yticks green, but it doesn't work, including in the output shown in the tutorial. Code for reproduction # plt.fi...
X Description: Bug summary In this tutorial, line.set_color('green') is used to attempt to make the yticks green, but it doesn't work, including in the output shown in the tutorial. Code for reproduct...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25522
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: `line.set_color()` not working for ticks","articleBody":"### Bug summary\n\nIn [this](https://matplotlib.org/stable/tutorials/intermediate/artists.html) tutorial, `line.set_color('green')` is used to attempt to make the yticks green, but it doesn't work, including in the output shown in the tutorial.\n\n### Code for reproduction\n\n```python\n# plt.figure creates a matplotlib.figure.Figure instance\r\nfig = plt.figure()\r\nrect = fig.patch # a rectangle instance\r\nrect.set_facecolor('lightgoldenrodyellow')\r\n\r\nax1 = fig.add_axes([0.1, 0.3, 0.4, 0.4])\r\nrect = ax1.patch\r\nrect.set_facecolor('lightslategray')\r\n\r\n\r\nfor label in ax1.xaxis.get_ticklabels():\r\n # label is a Text instance\r\n label.set_color('red')\r\n label.set_rotation(45)\r\n label.set_fontsize(16)\r\n\r\nfor line in ax1.yaxis.get_ticklines():\r\n # line is a Line2D instance\r\n line.set_color('green')\r\n line.set_markersize(25)\r\n line.set_markeredgewidth(3)\r\n\r\nplt.show()\n```\n\n\n### Actual outcome\n\nhttps://matplotlib.org/stable/_images/sphx_glr_artists_004.png\n\n### Expected outcome\n\nSame thing but with the yticks green.\n\n### Additional information\n\n_No response_\n\n### Operating system\n\n_No response_\n\n### Matplotlib Version\n\n3.7.1\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n_No response_\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\nNone","author":{"url":"https://github.com/eliottrosenberg","@type":"Person","name":"eliottrosenberg"},"datePublished":"2023-03-21T17:41:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/25522/matplotlib/issues/25522"}
| 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:2194204b-0027-7abf-412d-a4136cc93801 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FC2:163D9C:272975D:34166BF:6A52132E |
| html-safe-nonce | fdf16827f082a097b009e1b2f84f9ef92f968fdf17ca6bbda86f45add5f3bcd3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkMyOjE2M0Q5QzoyNzI5NzVEOjM0MTY2QkY6NkE1MjEzMkUiLCJ2aXNpdG9yX2lkIjoiMTM0MTY0MzU1MDQ5Mjg1NzEzNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3eb54dc72bd94fe86cbcefd0375f51c3e70a64085d77a4fe4680f17a7e155d5a |
| hovercard-subject-tag | issue:1634424559 |
| 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/25522/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b290c3c593d4cbbab4c6d516036ad5e21abe254ce4896ce66ac5eb8f3bbfcb92/matplotlib/matplotlib/issues/25522 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b290c3c593d4cbbab4c6d516036ad5e21abe254ce4896ce66ac5eb8f3bbfcb92/matplotlib/matplotlib/issues/25522 |
| og:image:alt | Bug summary In this tutorial, line.set_color('green') is used to attempt to make the yticks green, but it doesn't work, including in the output shown in the tutorial. Code for reproduction # plt.fi... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | eliottrosenberg |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width