Title: Polar plot autoscaling changes radial bound to negative. · Issue #15814 · matplotlib/matplotlib · GitHub
Open Graph Title: Polar plot autoscaling changes radial bound to negative. · Issue #15814 · matplotlib/matplotlib
X Title: Polar plot autoscaling changes radial bound to negative. · Issue #15814 · matplotlib/matplotlib
Description: Bug report The input data in the script below should make a straight line on a polar plot. When autoscaling is off, the resulting line looks correct. When autoscaling is turned on (which is the default), the line has a strange bend aroun...
Open Graph Description: Bug report The input data in the script below should make a straight line on a polar plot. When autoscaling is off, the resulting line looks correct. When autoscaling is turned on (which is the def...
X Description: Bug report The input data in the script below should make a straight line on a polar plot. When autoscaling is off, the resulting line looks correct. When autoscaling is turned on (which is the def...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/15814
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Polar plot autoscaling changes radial bound to negative.","articleBody":"### Bug report\r\n\r\nThe input data in the script below should make a straight line on a polar plot. When autoscaling is off, the resulting line looks correct. When autoscaling is turned on (which is the default), the line has a strange bend around the center of the plot.\r\n\r\nIt appears that the autoscaling algorithm is adding a pad which makes the radial scale go negative. I could be wrong but I think that's not correct behavior and the radial axis should be bounded at 0.\r\n\r\n```\r\nimport pylab\r\npylab.matplotlib.rcParams['interactive'] = True\r\n\r\nx = [2.901676526904393, 2.9012943951345322, 2.9008264463184146, 2.900251974536176, 2.8995434240434714, 2.8986632998940496, 2.8975592417044105, 2.896155845305896, 2.8943404182054597, 2.8919366806494335, 2.888652559319873, 2.8839664605646798, 2.876846822907351, 2.8649279251651056, 2.8413281415735243, 2.7741754185913265, 1.844830893988377, 6.224724111905722, 6.138489000172224, 6.111321790945689, 6.0981736547178755, 6.090509944966482, 6.0855552660746755, 6.082137431088338, 6.079676052745924, 6.077850957762468, 6.076471064504868, 6.075415284460905, 6.074603165092719, 6.073979164563473, 6.073503704258087, 6.073147819211094, 6.07288982451639, 6.0727131641587055]\r\n\r\ny = [1.07962386292976, 1.044422417525868, 1.0064402062381226, 0.9653486094255949, 0.920785277458781, 0.8723569703753221, 0.8196468528318069, 0.7622284862741852, 0.699689291693624, 0.6316664569433821, 0.5578976274920968, 0.47828656447751405, 0.39297980503016783, 0.30244538042662383, 0.207548088666055, 0.10971430600558985, 0.017669567101071815, 0.09310198323363816, 0.19114252617493488, 0.2865654508503026, 0.37779150232498293, 0.4638890112628551, 0.5443368387541254, 0.6189466207692367, 0.6877843659040478, 0.7510927872415143, 0.8092236681586527, 0.8625849374996973, 0.9116027372460488, 0.9566963415173629, 0.9982629771777992, 1.036669713663131, 1.0722500953432978, 1.1053037734102051]\r\n\r\nfig = pylab.figure()\r\nax = fig.add_axes((0.05,0.1,0.90,0.80),projection='polar')\r\nax.grid(True) \r\n\r\n# Uncomment to see the correct plot\r\n#ax.set_autoscale_on(False)\r\n\r\nax.plot(x, y)\r\npylab.show() \r\n```\r\n\r\nHere is the incorrect result when autoscaling is on:\r\n\r\n\r\n\r\nHere is the correction result when autoscaling is off:\r\n\r\n\r\n**Matplotlib version**\r\n\r\n * Operating system: RedHat Linux 7.4\r\n * Matplotlib version: 3.1.1\r\n * Matplotlib backend: Qt5Agg\r\n * Python version: 3.7.4\r\n\r\n","author":{"url":"https://github.com/TD22057","@type":"Person","name":"TD22057"},"datePublished":"2019-12-02T22:26:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/15814/matplotlib/issues/15814"}
| 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:13c0a0e3-f60f-4399-04af-2beff06b4567 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C1A6:2049AA:1088E0:15E7B6:6A52EC40 |
| html-safe-nonce | a28a8c8a5a8b054e4e216e40d158908fc76ae7e54a86573f1f7928bf85112715 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUE2OjIwNDlBQToxMDg4RTA6MTVFN0I2OjZBNTJFQzQwIiwidmlzaXRvcl9pZCI6Ijc0MjI2MzU1Nzg3Nzk0Mjk5NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 4f2e7ceac518d0ebcad7544cc30515d54b3be7be79afd898a6010d075d575aa7 |
| hovercard-subject-tag | issue:531579287 |
| 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/15814/issue_layout |
| twitter:image | https://opengraph.githubassets.com/477b664b3c6d6e139d7b609c141a8de2df888b79d8b893078d0ca5c8060be652/matplotlib/matplotlib/issues/15814 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/477b664b3c6d6e139d7b609c141a8de2df888b79d8b893078d0ca5c8060be652/matplotlib/matplotlib/issues/15814 |
| og:image:alt | Bug report The input data in the script below should make a straight line on a polar plot. When autoscaling is off, the resulting line looks correct. When autoscaling is turned on (which is the def... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TD22057 |
| 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