Title: Possible bug when sharing x axis in subplots. · Issue #467 · proplot-dev/proplot · GitHub
Open Graph Title: Possible bug when sharing x axis in subplots. · Issue #467 · proplot-dev/proplot
X Title: Possible bug when sharing x axis in subplots. · Issue #467 · proplot-dev/proplot
Description: Description When I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug to me. Steps to reproduce fig,axs = pplt.subp...
Open Graph Description: Description When I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug to me...
X Description: Description When I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug t...
Opengraph URL: https://github.com/proplot-dev/proplot/issues/467
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Possible bug when sharing x axis in subplots.","articleBody":"\u003c!-- Thanks for helping us make proplot a better package! If this is a bug report, please use the template provided below. If this is a feature request, you can delete the template text (just try to be descriptive with your request). --\u003e\r\n\r\n### Description\r\n\r\nWhen I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug to me.\r\n\r\n### Steps to reproduce\r\n\r\n```python\r\nfig,axs = pplt.subplots(nrows=2,ncols=1, sharex=True)\r\naxs[0].scatter([0,10],[0,1])\r\naxs[1].scatter([0,1],[0,1])\r\n```\r\n\r\n**Expected behavior**: \r\n\r\nI would expect 2 plots, one on top of the other, with the x axis aligned so that I see 2 points on the very right on top, and two points on the very left in the bottom (see below for matplotlib output)\r\n\r\n**Actual behavior**: \r\n\r\nWith proplot I get the following plot:\r\n\r\n\r\n\r\n### Equivalent steps in matplotlib\r\n\r\nI can do something similar with matplotlib\r\n\r\n```python\r\nfig = plt.figure()\r\nax1 = plt.subplot(211)\r\nplt.scatter([0,10],[0,1])\r\nplt.subplot(212, sharex = ax1)\r\nplt.scatter([0,1],[0,1])\r\n```\r\n\r\nobtaining \r\n\r\n\r\n\r\n### Proplot version\r\n\r\nmatplotlib: 3.8.4\r\nproplot: 0.9.91\r\n","author":{"url":"https://github.com/reemagit","@type":"Person","name":"reemagit"},"datePublished":"2024-10-23T04:32:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/467/proplot/issues/467"}
| 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:c291e23c-a0e3-09e7-ea52-5e3e42e29bf2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B904:2C3E22:15C3B2E:1C2468A:696B218B |
| html-safe-nonce | 02ece0a4e9693fabf421f82563c9193985f4b87fbeb483b6119b0ffaa90b802d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTA0OjJDM0UyMjoxNUMzQjJFOjFDMjQ2OEE6Njk2QjIxOEIiLCJ2aXNpdG9yX2lkIjoiNjc3NzM4MTczODI4MDMyOTYxMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bd86e26ed8435518040a6e72ef61f1b6b02a1ac1866267c822f068794bdb98ab |
| hovercard-subject-tag | issue:2607189895 |
| 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/proplot-dev/proplot/467/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9447b61211f15c1c0368c08c4424bc97b529860d0e9844b3cda645275a3e633c/proplot-dev/proplot/issues/467 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9447b61211f15c1c0368c08c4424bc97b529860d0e9844b3cda645275a3e633c/proplot-dev/proplot/issues/467 |
| og:image:alt | Description When I plot two subplots aligned as rows, the x is not really shared and there is a weird effect on the grid/xticks. Not sure if I'm doing something wrong, but it seems like a bug to me... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | reemagit |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| go-import | github.com/proplot-dev/proplot git https://github.com/proplot-dev/proplot.git |
| octolytics-dimension-user_id | 108025793 |
| octolytics-dimension-user_login | proplot-dev |
| octolytics-dimension-repository_id | 113293661 |
| octolytics-dimension-repository_nwo | proplot-dev/proplot |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 113293661 |
| octolytics-dimension-repository_network_root_nwo | proplot-dev/proplot |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width