Title: Autoscaling has fundamental problems · Issue #7413 · matplotlib/matplotlib · GitHub
Open Graph Title: Autoscaling has fundamental problems · Issue #7413 · matplotlib/matplotlib
X Title: Autoscaling has fundamental problems · Issue #7413 · matplotlib/matplotlib
Description: #6915 brings to light two problems with autoscaling: It looks very inefficient: every plotting method in _axes adds an artist to the axes and then calls autoscale_view, occasionally with arguments. autoscale_view then does a complete aut...
Open Graph Description: #6915 brings to light two problems with autoscaling: It looks very inefficient: every plotting method in _axes adds an artist to the axes and then calls autoscale_view, occasionally with arguments....
X Description: #6915 brings to light two problems with autoscaling: It looks very inefficient: every plotting method in _axes adds an artist to the axes and then calls autoscale_view, occasionally with arguments....
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/7413
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Autoscaling has fundamental problems","articleBody":"#6915 brings to light two problems with autoscaling:\r\n\r\n1) It looks very inefficient: every plotting method in `_axes` adds an artist to the axes and then calls `autoscale_view`, occasionally with arguments. `autoscale_view` then does a complete autoscaling operation, going through all of the artists that have been added up to that point. Logically, it seems like the autoscaling should be done only before a draw operation, not every time an artist is added.\r\n\r\n2) Beyond the apparent inefficiency, it doesn't work right for collections. `add_collection` calls `self.update_datalim(collection.get_datalim(self.transData))` to get dataLim. This uses the *present* `transData` to calculate the size in *data* units of objects that have sizes and/or positions that may be specified in *screen* or *axes* units. Then the subsequent call to `autoscale_view` uses those positions to modify the view limits. But this changes `transData` so that the intended result cannot be achieved--when drawn, the sizes and locations in data units will not be what they were calculated to be when the view limits were set. The mismatch will grow as additional artists are added, each one potentially changing the data limits and the view limits. Usually we get away with this with no one noticing, but not always. #6915 shows that subsequently changing the scale of an axis, e.g. linear to log, can wreck the plot. ","author":{"url":"https://github.com/efiring","@type":"Person","name":"efiring"},"datePublished":"2016-11-05T21:25:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":25},"url":"https://github.com/7413/matplotlib/issues/7413"}
| 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:86a7a1f9-b79e-8ba7-2f3b-74958085f875 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 97C2:227FB6:1BE15B:24EEDB:6A52C42F |
| html-safe-nonce | 7d85b5f44e301a3f9424c1e98a163fee75f42da33695bb5ade886698c89c8d85 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0MyOjIyN0ZCNjoxQkUxNUI6MjRFRURCOjZBNTJDNDJGIiwidmlzaXRvcl9pZCI6IjQ4ODYzMTA5NTI0NTU4NzUwNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 466c52baa2586179fdcff8aedeb3bbd147223296dbe636855b1e581d4c8edfc7 |
| hovercard-subject-tag | issue:187524243 |
| 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/7413/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9de06b93f17773cd21b3e7865f29ad0bec999a937935db7cde24bd75b05bf108/matplotlib/matplotlib/issues/7413 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9de06b93f17773cd21b3e7865f29ad0bec999a937935db7cde24bd75b05bf108/matplotlib/matplotlib/issues/7413 |
| og:image:alt | #6915 brings to light two problems with autoscaling: It looks very inefficient: every plotting method in _axes adds an artist to the axes and then calls autoscale_view, occasionally with arguments.... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | efiring |
| 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