Title: Raise error if argument to xlim is invalid, e.g., nan · Issue #7460 · matplotlib/matplotlib · GitHub
Open Graph Title: Raise error if argument to xlim is invalid, e.g., nan · Issue #7460 · matplotlib/matplotlib
X Title: Raise error if argument to xlim is invalid, e.g., nan · Issue #7460 · matplotlib/matplotlib
Description: As of 2.0b4, passing nan as a limit to xlim seems to reset both limits to (-0.001, 0.001) (try e.g. with plt.plot([0, 1]); plt.xlim(right=np.nan)). I think this should either error, or, more usefully, be interpreted as None (i.e. leave t...
Open Graph Description: As of 2.0b4, passing nan as a limit to xlim seems to reset both limits to (-0.001, 0.001) (try e.g. with plt.plot([0, 1]); plt.xlim(right=np.nan)). I think this should either error, or, more useful...
X Description: As of 2.0b4, passing nan as a limit to xlim seems to reset both limits to (-0.001, 0.001) (try e.g. with plt.plot([0, 1]); plt.xlim(right=np.nan)). I think this should either error, or, more useful...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7460
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Raise error if argument to xlim is invalid, e.g., nan","articleBody":"As of 2.0b4, passing `nan` as a limit to `xlim` seems to reset *both* limits to `(-0.001, 0.001)` (try e.g. with `plt.plot([0, 1]); plt.xlim(right=np.nan)`). I think this should either error, or, more usefully, be interpreted as None (i.e. leave that limit as is). (For extra points, we can also bikeshed what passing `inf` to `xlim` should mean.)\r\n\r\nThe main use case would be when the `xlim` is read from some float context (e.g. from an array) where you can easily store `nan` but not `None`.","author":{"url":"https://github.com/anntzer","@type":"Person","name":"anntzer"},"datePublished":"2016-11-15T01:43:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/7460/matplotlib/issues/7460"}
| 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:ac53dce8-8f9e-9da0-bc87-45c0081516ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE4A:195038:33A3C:44BE1:6A52B65B |
| html-safe-nonce | 58bc0ecd91bd28d96c9e9254ace7340daed6f82dd40ed09f74bce7b390d8c765 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTRBOjE5NTAzODozM0EzQzo0NEJFMTo2QTUyQjY1QiIsInZpc2l0b3JfaWQiOiI3MDM2NjIwNTQ0MDMzMzM4OTcxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1c994059e525fad5c77638e2033e70c438a7b3580500bdbf1a83539ca2fe9eb1 |
| hovercard-subject-tag | issue:189276838 |
| 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/7460/issue_layout |
| twitter:image | https://opengraph.githubassets.com/561b5829bbe42a785058597977b6610bc93d132f604b61f0b8291b2c3cd809c4/matplotlib/matplotlib/issues/7460 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/561b5829bbe42a785058597977b6610bc93d132f604b61f0b8291b2c3cd809c4/matplotlib/matplotlib/issues/7460 |
| og:image:alt | As of 2.0b4, passing nan as a limit to xlim seems to reset both limits to (-0.001, 0.001) (try e.g. with plt.plot([0, 1]); plt.xlim(right=np.nan)). I think this should either error, or, more useful... |
| 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