Title: [Bug]: subplot_mosaic bug with empty_sentinel and sharey=True · Issue #25417 · matplotlib/matplotlib · GitHub
Open Graph Title: [Bug]: subplot_mosaic bug with empty_sentinel and sharey=True · Issue #25417 · matplotlib/matplotlib
X Title: [Bug]: subplot_mosaic bug with empty_sentinel and sharey=True · Issue #25417 · matplotlib/matplotlib
Description: Bug summary When an empty sentinel is used at the beginning of a row, with the sharey option True, the tick labelling on the y-axis isn't shown. Code for reproduction from matplotlib import pyplot as plt import numpy as np data = [ np.ar...
Open Graph Description: Bug summary When an empty sentinel is used at the beginning of a row, with the sharey option True, the tick labelling on the y-axis isn't shown. Code for reproduction from matplotlib import pyplot ...
X Description: Bug summary When an empty sentinel is used at the beginning of a row, with the sharey option True, the tick labelling on the y-axis isn't shown. Code for reproduction from matplotlib import pyp...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/25417
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Bug]: subplot_mosaic bug with empty_sentinel and sharey=True","articleBody":"### Bug summary\n\nWhen an empty sentinel is used at the beginning of a row, with the sharey option True, the tick labelling on the y-axis isn't shown.\n\n### Code for reproduction\n\n```python\nfrom matplotlib import pyplot as plt\r\nimport numpy as np\r\n\r\ndata = [ np.array( [ i for i in range( 100 ) ] ) , np.random.random( 100 ) ]\r\n\r\nfig1 = plt.figure()\r\n\r\n# create a mosaic with an empty_sentinel \r\n# at the END of the row. \r\n# 'sharey=True' works.\r\nsubplots = fig1.subplot_mosaic(\r\n \"\"\"\r\n AB.\r\n CDE\r\n \"\"\" , sharex = True , sharey = True )\r\n\r\nsubplots[ \"A\" ].plot( data[0] , data[1] )\r\nsubplots[ \"B\" ].plot( data[0] , data[1] )\r\nsubplots[ \"C\" ].plot( data[0] , data[1] )\r\nsubplots[ \"D\" ].plot( data[0] , data[1] )\r\nsubplots[ \"E\" ].plot( data[0] , data[1] )\r\n\r\nsubplots[ \"C\" ].set_xlabel( 'A variable' )\r\nsubplots[ \"D\" ].set_xlabel( 'A variable' )\r\nsubplots[ \"E\" ].set_xlabel( 'A variable' )\r\n\r\nsubplots[ \"A\" ].set_ylabel( 'Some data' )\r\nsubplots[ \"C\" ].set_ylabel( 'Some data' )\r\n\r\nplt.savefig( 'mosaic_working.pdf' )\r\n\r\n# create a mosaic with an empty_sentinel \r\n# at the start of the row. \r\n# 'sharey=True' DOESN'T work: the y ticks\r\n# are missing.\r\nfig2 = plt.figure()\r\n\r\nsubplots = fig2.subplot_mosaic(\r\n \"\"\"\r\n .AB\r\n CDE\r\n \"\"\" , sharey = True )\r\n\r\nsubplots[ \"A\" ].plot( data[0] , data[1] )\r\nsubplots[ \"B\" ].plot( data[0] , data[1] )\r\nsubplots[ \"C\" ].plot( data[0] , data[1] )\r\nsubplots[ \"D\" ].plot( data[0] , data[1] )\r\nsubplots[ \"E\" ].plot( data[0] , data[1] )\r\n\r\nsubplots[ \"C\" ].set_xlabel( 'A variable' )\r\nsubplots[ \"D\" ].set_xlabel( 'A variable' )\r\nsubplots[ \"E\" ].set_xlabel( 'A variable' )\r\n\r\nsubplots[ \"A\" ].set_ylabel( 'Some data' )\r\nsubplots[ \"C\" ].set_ylabel( 'Some data' )\r\n\r\nplt.savefig( 'mosaic_not_working.pdf' )\n```\n\n\n### Actual outcome\n\n[mosaic_working.pdf](https://github.com/matplotlib/matplotlib/files/10932054/mosaic_working.pdf)\r\n[mosaic_not_working.pdf](https://github.com/matplotlib/matplotlib/files/10932056/mosaic_not_working.pdf)\r\n\n\n### Expected outcome\n\nThe y-axis in the first subplot of the top row should have y ticks. \n\n### Additional information\n\n_No response_\n\n### Operating system\n\nOS\n\n### Matplotlib Version\n\n3.7.0\n\n### Matplotlib Backend\n\n_No response_\n\n### Python version\n\n3.11\n\n### Jupyter version\n\n_No response_\n\n### Installation\n\npip","author":{"url":"https://github.com/apicco","@type":"Person","name":"apicco"},"datePublished":"2023-03-09T13:29:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/25417/matplotlib/issues/25417"}
| 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:79422cec-aff1-b16a-126b-aa4cdc094229 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD44:12E3C6:1108E98:16A0D75:6A51C55F |
| html-safe-nonce | 5a4f89b8ba210e42de9d5d7c8a30aaa96837765c6841eb8a98de33cb0636233b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDQ0OjEyRTNDNjoxMTA4RTk4OjE2QTBENzU6NkE1MUM1NUYiLCJ2aXNpdG9yX2lkIjoiMTA1MTY0OTk3MDAwNzAzMzE4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | eb2acc2daeccf8593949f20d0b2f344edeb9b73618ebf2d0afad2e4212bd4269 |
| hovercard-subject-tag | issue:1617261991 |
| 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/25417/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7a9d43176731575acc1cfcf436e321e4515689f99709fc39352fe8089e3ae418/matplotlib/matplotlib/issues/25417 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7a9d43176731575acc1cfcf436e321e4515689f99709fc39352fe8089e3ae418/matplotlib/matplotlib/issues/25417 |
| og:image:alt | Bug summary When an empty sentinel is used at the beginning of a row, with the sharey option True, the tick labelling on the y-axis isn't shown. Code for reproduction from matplotlib import pyplot ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | apicco |
| 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