Title: Unexpected behaviour in errorbar · Issue #2717 · matplotlib/matplotlib · GitHub
Open Graph Title: Unexpected behaviour in errorbar · Issue #2717 · matplotlib/matplotlib
X Title: Unexpected behaviour in errorbar · Issue #2717 · matplotlib/matplotlib
Description: I have some data y plotted against x with asymmetric error bars yerr (=[up, down]). The data, y, contains some np.nan values at the end and likewise for yerr. However, when I plot the data using matplotlib's errorbar function, it gets th...
Open Graph Description: I have some data y plotted against x with asymmetric error bars yerr (=[up, down]). The data, y, contains some np.nan values at the end and likewise for yerr. However, when I plot the data using ma...
X Description: I have some data y plotted against x with asymmetric error bars yerr (=[up, down]). The data, y, contains some np.nan values at the end and likewise for yerr. However, when I plot the data using ma...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/2717
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected behaviour in errorbar","articleBody":"I have some data y plotted against x with asymmetric error bars yerr (`=[up, down]`). The data, y, contains some `np.nan` values at the end and likewise for yerr. However, when I plot the data using matplotlib's `errorbar` function, it gets this weird marker behaviour:\n\n\n\nWhat could cause this? I ran a few checks and the nan values line up, meaning that they shouldn't be plotted at all!\n\nHeres the function:\n\n`axis.errorbar(profile.R, profile.M, yerr=profile.MW, fmt='b.')`\n\n`axis.set_ylim(axis.get_ylim()[::-1])`\n\nand here's some pictures:\nafter re-phrase: `axis.errorbar(profile.R, profile.M, yerr=(profile.MW[0], profile.MW[1]), fmt='b.')`, it still produces the same plot\nafter re-phrasing to use only one set: \n\n`axis.errorbar(profile.R, profile.M, yerr=(profile.MW[1], profile.MW[1]), fmt='b.')`\n\n\n(this also happens if I use `profile.MW[0]`)\n\nI've also downgraded matplotlib and it still doesn't work!\n\nBut when I take the values out of their np.arrays for the last 8 elements by copy and paste (`axis.errorbar([32.9592, 34.60716, 36.33696, 38.15418, 40.06254, 42.06576, 44.16756, 46.37724],[np.nan, 28.18328608, 27.41428602, np.nan, 27.30407038, np.nan, np.nan, np.nan], yerr=[[np.nan, 1.16532339, 0.73753135, np.nan, 0.68722997, np.nan, np.nan, np.nan], [np.nan, 1.16532339, 0.73753135, np.nan, 0.68722997, np.nan, np.nan, np.nan]])`)\n\n\nit works!! WTF!\n\nAny ideas?\n\nThanks\n","author":{"url":"https://github.com/lapsed-pacifist","@type":"Person","name":"lapsed-pacifist"},"datePublished":"2014-01-10T19:52:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/2717/matplotlib/issues/2717"}
| 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:a72771e3-33ee-1435-5dbd-5e55bfc7d21b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C9EA:6E570:9EC523:DA109B:6A555432 |
| html-safe-nonce | df678c501aa363079ec0f37da2817dda1206bcf9e604d785155311351931ee2b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUVBOjZFNTcwOjlFQzUyMzpEQTEwOUI6NkE1NTU0MzIiLCJ2aXNpdG9yX2lkIjoiNDY3OTI1NTkwNDg3Njg0MTQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 293d955fa36fc3ff658572c7011740b22b773610f4b96afdca86ffb1e2a887c9 |
| hovercard-subject-tag | issue:25418179 |
| 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/2717/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a7be1c4f5f139f8433c50f43013a7887ba039d42f5941c52df54a8adfd469d1b/matplotlib/matplotlib/issues/2717 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a7be1c4f5f139f8433c50f43013a7887ba039d42f5941c52df54a8adfd469d1b/matplotlib/matplotlib/issues/2717 |
| og:image:alt | I have some data y plotted against x with asymmetric error bars yerr (=[up, down]). The data, y, contains some np.nan values at the end and likewise for yerr. However, when I plot the data using ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lapsed-pacifist |
| hostname | github.com |
| expected-hostname | github.com |
| None | b5665c84831ed9ac4fb79519c16c9c5580ba8092fb8bb6e3e72972ec7197348e |
| 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 | 73595e82546ca2415571a2031890ab16ecb3001a |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width