Title: plot_date() after axhline() doesn't rescale axes · Issue #7742 · matplotlib/matplotlib · GitHub
Open Graph Title: plot_date() after axhline() doesn't rescale axes · Issue #7742 · matplotlib/matplotlib
X Title: plot_date() after axhline() doesn't rescale axes · Issue #7742 · matplotlib/matplotlib
Description: If I plot an axhline first, and then two points with plot_date, the x-axis is not rescaled to the two new data points: import matplotlib.pyplot as plt from datetime import datetime fig, axs = plt.subplots(2, 1) axs[0].axhline(1.5) axs[0]...
Open Graph Description: If I plot an axhline first, and then two points with plot_date, the x-axis is not rescaled to the two new data points: import matplotlib.pyplot as plt from datetime import datetime fig, axs = plt.s...
X Description: If I plot an axhline first, and then two points with plot_date, the x-axis is not rescaled to the two new data points: import matplotlib.pyplot as plt from datetime import datetime fig, axs = plt.s...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7742
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"plot_date() after axhline() doesn't rescale axes","articleBody":"If I plot an `axhline` first, and then two points with `plot_date`, the x-axis is not rescaled to the two new data points:\r\n\r\n```python\r\nimport matplotlib.pyplot as plt\r\nfrom datetime import datetime\r\n\r\nfig, axs = plt.subplots(2, 1)\r\n\r\naxs[0].axhline(1.5)\r\naxs[0].plot([datetime(2016, 1, 1, 0, 0, 0), datetime(2016, 1, 2, 0, 0, 0)], [1, 2])\r\n\r\naxs[1].plot([datetime(2016, 1, 1, 0, 0, 0), datetime(2016, 1, 2, 0, 0, 0)], [1, 2])\r\naxs[1].axhline(1.5)\r\n\r\nplt.show()\r\n```\r\n\r\n\r\nI would expect the two plots to be the same, and the plotting order not to matter.\r\n\r\n\r\n\r\nPresent on current master (2.0.0rc2.post2912+g015d8d5) and on 1.5","author":{"url":"https://github.com/dstansby","@type":"Person","name":"dstansby"},"datePublished":"2017-01-04T17:38:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/7742/matplotlib/issues/7742"}
| 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:0411f796-af83-a577-afe9-1de469794ad0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2A4:111866:292CB99:36AF8DC:6A52162A |
| html-safe-nonce | 18321998c0689d299c23ad1659233c56ee06c948bec7bcefb4b3745f481a06d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkE0OjExMTg2NjoyOTJDQjk5OjM2QUY4REM6NkE1MjE2MkEiLCJ2aXNpdG9yX2lkIjoiODY5OTY1OTEyODMxNzAyMzc4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d8c60b2ceffabd5cbacb6d050b4a0dc303b0ec9a23c0a1fbf327ac65ee6e8456 |
| hovercard-subject-tag | issue:198766370 |
| 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/7742/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bf27261d90dc87f98efb79929681cde77431fd4499d0fef7209cba8f5bfcd87e/matplotlib/matplotlib/issues/7742 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bf27261d90dc87f98efb79929681cde77431fd4499d0fef7209cba8f5bfcd87e/matplotlib/matplotlib/issues/7742 |
| og:image:alt | If I plot an axhline first, and then two points with plot_date, the x-axis is not rescaled to the two new data points: import matplotlib.pyplot as plt from datetime import datetime fig, axs = plt.s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dstansby |
| 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