Title: get_tightbbox doesn't account for markeredgewidth · Issue #16606 · matplotlib/matplotlib · GitHub
Open Graph Title: get_tightbbox doesn't account for markeredgewidth · Issue #16606 · matplotlib/matplotlib
X Title: get_tightbbox doesn't account for markeredgewidth · Issue #16606 · matplotlib/matplotlib
Description: Simple to solve problem, making issue just to refer to it in the PR. Bug report For lines, Axes.get_tightbbox relies on Line2D.get_window_extent, which computes extra padding due to markers as ms = (self._markersize / 72.0 * self.figure....
Open Graph Description: Simple to solve problem, making issue just to refer to it in the PR. Bug report For lines, Axes.get_tightbbox relies on Line2D.get_window_extent, which computes extra padding due to markers as ms =...
X Description: Simple to solve problem, making issue just to refer to it in the PR. Bug report For lines, Axes.get_tightbbox relies on Line2D.get_window_extent, which computes extra padding due to markers as ms =...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/16606
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"get_tightbbox doesn't account for markeredgewidth","articleBody":"Simple to solve problem, making issue just to refer to it in the PR.\r\n\r\n### Bug report\r\n\r\nFor lines, `Axes.get_tightbbox` relies on `Line2D.get_window_extent`, which computes extra padding due to markers as \r\n\r\n```python\r\nms = (self._markersize / 72.0 * self.figure.dpi) * 0.5\r\n```\r\nbut this can cut off half of the marker edge.\r\n\r\nThis phenomena which is only visible if you have a line that extends outside of a plot, and has `markeredgewidth \u003e 1`. For simple markers, (like 'S', 'O'), the code should instead read\r\n\r\n```python\r\nextra_pts = self._markersize + self._markeredgewidth\r\nms = (extra_pts / 72.0 * self.figure.dpi) * 0.5\r\n```\r\nI'll edit this shortly to include code that reproduces the bug, after I document for all the common markers what the expected behavior should be.\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: Linux\r\n * Matplotlib version: 3.2.0rc2.post1594.dev0+gead45c7e6\r\n * Matplotlib backend: module://ipykernel.pylab.backend_inline`\r\n * Python version: 3.7.3\r\nMPL installed from Github, Python is miniconda. \r\n","author":{"url":"https://github.com/brunobeltran","@type":"Person","name":"brunobeltran"},"datePublished":"2020-02-28T23:58:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/16606/matplotlib/issues/16606"}
| 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:915cc3f9-375c-2ed9-adde-8b6eed427947 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BA6E:2371E7:428EFD7:5CFF04D:6A50CC57 |
| html-safe-nonce | 1352b98117794a1c938a08f32137a63b4fde174e845399f0e34e03668e65e487 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQTZFOjIzNzFFNzo0MjhFRkQ3OjVDRkYwNEQ6NkE1MENDNTciLCJ2aXNpdG9yX2lkIjoiMjk5ODg3MDUxNTc0NDAzMzg3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a9a51d4faef45a1dfa00c4f8b26ec01b0a6632c9c4a3ef4e8b706c049310c315 |
| hovercard-subject-tag | issue:573071704 |
| 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/16606/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35658d0e304f40623cab1a96d0a8d8730f26f8767b9d80b0bdf1095bbdb31653/matplotlib/matplotlib/issues/16606 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35658d0e304f40623cab1a96d0a8d8730f26f8767b9d80b0bdf1095bbdb31653/matplotlib/matplotlib/issues/16606 |
| og:image:alt | Simple to solve problem, making issue just to refer to it in the PR. Bug report For lines, Axes.get_tightbbox relies on Line2D.get_window_extent, which computes extra padding due to markers as ms =... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brunobeltran |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| 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 | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width