Title: plot line not shown in some cases involving masked arrays · Issue #5016 · matplotlib/matplotlib · GitHub
Open Graph Title: plot line not shown in some cases involving masked arrays · Issue #5016 · matplotlib/matplotlib
X Title: plot line not shown in some cases involving masked arrays · Issue #5016 · matplotlib/matplotlib
Description: The following code is a short test of the much longer problem in my code: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) a=np.arange(2428, dtype=np.float64) a[0:1553] = 1.96808407167e+243 ...
Open Graph Description: The following code is a short test of the much longer problem in my code: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) a=np.arange(2428, dtype=np....
X Description: The following code is a short test of the much longer problem in my code: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) a=np.arange(2428, dtype=np....
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5016
X: @github
Domain: github.com
IPv4 address: 140.82.112.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"plot line not shown in some cases involving masked arrays","articleBody":"The following code is a short test of the much longer problem in my code:\n\n```\nimport numpy as np\nimport matplotlib.pyplot as plt\n\nfig = plt.figure()\nax = fig.add_subplot(111)\n\na=np.arange(2428, dtype=np.float64)\na[0:1553] = 1.96808407167e+243\na=np.ma.masked_greater(a, 1.e100)\n\nax.plot(a[678:], a[678:], linestyle=':', label='works')\nax.plot(a, a, label='does not work')\nax.plot(a[677:], a[677:], label='also does not work')\n\nax.legend()\nplt.show()\n```\n\nI create an array of dtype float64, and mask part of it (to mimic the data I found this with). I would then expect all plots to show something (and usually just use the second of the three here). Leaving out part of the masked values seems to help (first plot), but that part cannot be too small (third plot). Interestingly, even if plot 1 is commented out, the limits of the axes are correct: plot() itself seems to understand what it is supposed to be doing. It is just the 'line' that does not show up in the final image (neither with show() now savefig()).\n\nAt this point I am out of ideas, this suggesting somehow strongly to be a bug outside of this script.\n\nThis happens on a Debian Jessi machine, with both combinations of:\n\npython 2.7.9 + numpy 1.8.2 + matplotlib 1.4.2\npython 3.4.2 + numpy 1.8.2 + matplotlib 1.4.2\n","author":{"url":"https://github.com/knarrff","@type":"Person","name":"knarrff"},"datePublished":"2015-09-01T18:13:18Z","url":"https://github.com/matplotlib/matplotlib/issues/5016"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:6de7fde5-420b-1806-d5ae-78f90c1c1bb4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8FD6:C5B62:EACC5E:13F39A6:6B0654AF |
| html-safe-nonce | 746f50552f3b1ecd60138258243a4f6bdd6c29beb1c9142aa052d4539f24bba6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RkQ2OkM1QjYyOkVBQ0M1RToxM0YzOUE2OjZCMDY1NEFGIiwidmlzaXRvcl9pZCI6IjU1OTAzMzYwMjcwNDM5NzYzNjciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | d27cf56c09459d2a297c08c3d1850a961ff39465764b535ccf9779e487adfc41 |
| hovercard-subject-tag | issue:104324126 |
| 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/5016/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0ba8faad143ee16f6ea51b2d437e6c796526789b0eba4ba3c077b25e35a405ca/matplotlib/matplotlib/issues/5016 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0ba8faad143ee16f6ea51b2d437e6c796526789b0eba4ba3c077b25e35a405ca/matplotlib/matplotlib/issues/5016 |
| og:image:alt | The following code is a short test of the much longer problem in my code: import numpy as np import matplotlib.pyplot as plt fig = plt.figure() ax = fig.add_subplot(111) a=np.arange(2428, dtype=np.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | knarrff |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6324e6ac990fb6befbec840cc0e102a1071c339bfe8f9826bb12de2e3ba1d297 |
| 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 | 7f0aa75f4141d440c6110dc31af7ea7797abb6c4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width