Title: plot label will not show up on legend if _ is used as first charcter in label · Issue #5200 · matplotlib/matplotlib · GitHub
Open Graph Title: plot label will not show up on legend if _ is used as first charcter in label · Issue #5200 · matplotlib/matplotlib
X Title: plot label will not show up on legend if _ is used as first charcter in label · Issue #5200 · matplotlib/matplotlib
Description: If the ASCII character 95 _ is used in as first character in a plot label, the label will not show up in the legend. If only labels with _ in front are used, the following warning is given: /opt/pkg/devel/python/3.4.3/lib/python3.4/site-...
Open Graph Description: If the ASCII character 95 _ is used in as first character in a plot label, the label will not show up in the legend. If only labels with _ in front are used, the following warning is given: /opt/pk...
X Description: If the ASCII character 95 _ is used in as first character in a plot label, the label will not show up in the legend. If only labels with _ in front are used, the following warning is given: /opt/pk...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5200
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"plot label will not show up on legend if _ is used as first charcter in label","articleBody":"If the ASCII character 95 `_` is used in as first character in a plot label, the label will not show up in the legend.\n\nIf only labels with `_` in front are used, the following warning is given:\n\n``` bash\n/opt/pkg/devel/python/3.4.3/lib/python3.4/site-packages/matplotlib-1.4.3-py3.4-linux-x86_64.egg/matplotlib/axes/_axes.py:475: UserWarning: No labelled objects found. Use label='...' kwarg on individual plots.\n warnings.warn(\"No labelled objects found. \"\n```\n\nIn order to test this bug, I tried a variety of **matplotlib versions** on _Ubuntu_ and _OS X_.\n- 0.99.1.1\n- 1.1.0\n- 1.3.1\n- 1.4.3\n\n**All** have the above behavior. \n\nIn order to reproduce the bug, I used the following minimal example:\n\n``` python\nimport numpy as np\nimport matplotlib\nimport matplotlib.pyplot as plt\n\nprint(matplotlib.__version__)\n\nx = np.linspace(-10, 10, 1024)\ny = np.sin(x)\n\nplt.plot(x,y, label=\"_abc\")\n\nplt.legend()\nplt.show()\n```\n\nUsing `r\"_abc\"` instead does not solve the problem.\n","author":{"url":"https://github.com/PrometheusPi","@type":"Person","name":"PrometheusPi"},"datePublished":"2015-10-06T08:50:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/5200/matplotlib/issues/5200"}
| 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:7619e6d8-576a-353d-1a0d-1bf3c1f884e5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A266:28B0A3:920019:C4CCD5:6A52907E |
| html-safe-nonce | 7ebcf5fc6bca3bf182c7ffefce3ab26859980673a467334f30fdea4e497da341 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMjY2OjI4QjBBMzo5MjAwMTk6QzRDQ0Q1OjZBNTI5MDdFIiwidmlzaXRvcl9pZCI6IjU4OTMxMTU2OTA3OTg0NTI4NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4dc62696cd91fe2c10f23810fddb73aeb6a9dd162dcf540281da59cf2485d8a9 |
| hovercard-subject-tag | issue:109962733 |
| 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/5200/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ee6f262219850466f1ca192d5045261e44aeb94a164387b9b726209e80ce9964/matplotlib/matplotlib/issues/5200 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ee6f262219850466f1ca192d5045261e44aeb94a164387b9b726209e80ce9964/matplotlib/matplotlib/issues/5200 |
| og:image:alt | If the ASCII character 95 _ is used in as first character in a plot label, the label will not show up in the legend. If only labels with _ in front are used, the following warning is given: /opt/pk... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | PrometheusPi |
| 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