Title: Errorbar semilogy switch to log y removed error bars when crosses into negative · Issue #9149 · matplotlib/matplotlib · GitHub
Open Graph Title: Errorbar semilogy switch to log y removed error bars when crosses into negative · Issue #9149 · matplotlib/matplotlib
X Title: Errorbar semilogy switch to log y removed error bars when crosses into negative · Issue #9149 · matplotlib/matplotlib
Description: Bug report Bug summary When plotting error bars on data points, where the data is positive but the bar with the data-error is entering negative values, switching to log Y axes using semilogy() means that some data points are plotted with...
Open Graph Description: Bug report Bug summary When plotting error bars on data points, where the data is positive but the bar with the data-error is entering negative values, switching to log Y axes using semilogy() mean...
X Description: Bug report Bug summary When plotting error bars on data points, where the data is positive but the bar with the data-error is entering negative values, switching to log Y axes using semilogy() mean...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9149
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Errorbar semilogy switch to log y removed error bars when crosses into negative","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n### Bug report\r\n\r\n**Bug summary**\r\n\r\nWhen plotting error bars on data points, where the data is positive but the bar with the data-error is entering negative values, switching to log Y axes using semilogy() means that some data points are plotted without error bars at all (both y-err bars disappear).\r\n\r\n\u003c!--A short 1-2 sentences that succinctly describes the bug--\u003e\r\n\r\n**Code for reproduction**\r\n\r\ncreate a file example.dat:\r\n x dx y dy\r\n1.046850 0.0029168 0.042551 0.02420 \r\n1.506679 0.0030152 0.027573 0.02252 \r\n3.028597 0.1959554 0.021218 0.00974 \r\n3.656348 0.1034119 0.002788 0.01059 \r\n4.949535 0.4693247 0.006276 0.00969 \r\n\r\nfrom astropy.io import ascii\r\nfrom pylab import figure, errorbar,semilogy\r\nt = ascii.read('example.dat')\r\nfigure()\r\nerrorbar(t['x'],t['y'],xerr=t['dx'],yerr=t['dy'],fmt='s')\r\n\r\nThis shows a linear plot with errorbars fine. The third data point error bar extends into negative territory.\r\n\r\nsemilogy()\r\n\r\nNow the plot has a log y axis, but the error bar of the third point is gone.\r\n\r\n\r\n\u003c!--A minimum code snippet required to reproduce the bug, also minimizing the number of dependencies required--\u003e\r\n\r\n```python\r\n# Paste your code here\r\n#\r\n#\r\n```\r\nfrom astropy.io import ascii\r\nfrom pylab import figure, errorbar,semilogy\r\nt = ascii.read('example.dat')\r\nfigure()\r\nerrorbar(t['x'],t['y'],xerr=t['dx'],yerr=t['dy'],fmt='s')\r\n\r\n#This shows a linear plot with errorbars fine. The third data point error bar extends into negative territory.\r\n\r\nsemilogy()\r\n\r\n#Now the plot has a log y axis, but the error bar of the third point is gone.\r\n**Actual outcome**\r\n\r\n\u003c!--The output produced by the above code, which may be a screenshot, console output, etc.--\u003e\r\n\u003cimg width=\"642\" alt=\"screen shot 2017-09-01 at 15 43 50\" src=\"https://user-images.githubusercontent.com/5159688/29974969-96166f08-8f2c-11e7-860d-b0359bc89a5d.png\"\u003e\r\n\u003cimg width=\"638\" alt=\"screen shot 2017-09-01 at 15 44 05\" src=\"https://user-images.githubusercontent.com/5159688/29974980-9b15bee6-8f2c-11e7-9da1-0148a620886b.png\"\u003e\r\n\r\n```\r\n# If applicable, paste the console output here\r\n#\r\n#\r\n```\r\n\r\n**Expected outcome**\r\n\r\nAn errorbar in the log plot, surely the positive bar, and the negative going a few (3 or 5) decades down (perhaps with an arrow ending).\r\n\r\n\u003c!--A description of the expected outcome from the code snippet--\u003e\r\n\u003c!--If this used to work in an earlier version of Matplotlib, please note the version it used to work on--\u003e\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating System: OSX\r\n * Matplotlib Version: 2.0.2\r\n * Python Version:2.7\r\n * Jupyter Version (if applicable):\r\n * Other Libraries: astropy\r\n\r\n\u003c!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--\u003e\r\n\u003c!--If you installed from conda, please specify which channel you used if not the default--\u003e\r\nanaconda astroconda\r\n","author":{"url":"https://github.com/PaulKuin","@type":"Person","name":"PaulKuin"},"datePublished":"2017-09-01T14:50:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/9149/matplotlib/issues/9149"}
| 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:8babbac7-2bb2-e60d-cfc7-05a3b2f2fe61 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E4AC:2D0224:EC74F8:140823F:6A51FC57 |
| html-safe-nonce | 8ead565b5faa11c0279a267bc5afacecf72c9729094129f53919da8208e6fbe6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNEFDOjJEMDIyNDpFQzc0Rjg6MTQwODIzRjo2QTUxRkM1NyIsInZpc2l0b3JfaWQiOiI2MTUxODYyNzIyNzgwODU1MzgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | e872ca7530b8b4f0011bbecd7174d1a2587a929ed08cc31cd0560bedc32a3b8f |
| hovercard-subject-tag | issue:254664579 |
| 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/9149/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f51c4656757ab2a6cd78df48550753af171659bd74ae7df4ad1267ba864e81be/matplotlib/matplotlib/issues/9149 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f51c4656757ab2a6cd78df48550753af171659bd74ae7df4ad1267ba864e81be/matplotlib/matplotlib/issues/9149 |
| og:image:alt | Bug report Bug summary When plotting error bars on data points, where the data is positive but the bar with the data-error is entering negative values, switching to log Y axes using semilogy() mean... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PaulKuin |
| 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