Title: 'bottom cannot be >= top' when using `tight_layout` · Issue #5456 · matplotlib/matplotlib · GitHub
Open Graph Title: 'bottom cannot be >= top' when using `tight_layout` · Issue #5456 · matplotlib/matplotlib
X Title: 'bottom cannot be >= top' when using `tight_layout` · Issue #5456 · matplotlib/matplotlib
Description: I'm trying to understand why sometimes I get a ValueError when using tight_layout. The code of matplotlib is too complicated for me, but I'm trying to see what's happening using pdb. It seems that the problem comes from what get_tight_la...
Open Graph Description: I'm trying to understand why sometimes I get a ValueError when using tight_layout. The code of matplotlib is too complicated for me, but I'm trying to see what's happening using pdb. It seems that ...
X Description: I'm trying to understand why sometimes I get a ValueError when using tight_layout. The code of matplotlib is too complicated for me, but I'm trying to see what's happening using pdb. It...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/5456
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"'bottom cannot be \u003e= top' when using `tight_layout`","articleBody":"I'm trying to understand why sometimes I get a `ValueError` when using `tight_layout`.\n\nThe code of `matplotlib` is too complicated for me, but I'm trying to see what's happening using `pdb`.\n\nIt seems that the problem comes from what `get_tight_layout_figure` returns:\n\n```\n(Pdb) l\n379 subplot_list=subplot_list,\n380 ax_bbox_list=ax_bbox_list,\n381 pad=pad, h_pad=h_pad, w_pad=w_pad,\n382 rect=(left, bottom, right, top))\n383 \n384 -\u003e return kwargs\n(Pdb) p kwargs\n{'top': 0.43099934895833336, 'right': 0.97750000000000004, 'bottom': 0.56900065104166675, 'left': 0.16939941406250003}\n```\n\nI guess this in turns comes from what happens in `auto_adjust_subplotpars`, in the output of `_get_bottom` and `_get_top`:\n\n```\n(Pdb) p ax_bbox.ymin\n0.3716666666666667\n(Pdb) p tight_bbox.ymin\n-0.16733398437499999\n(Pdb) p ax_bbox.ymin - tight_bbox.ymin\n0.53900065104166672\n(Pdb) p tight_bbox.ymax\n1.1673339843749999\n(Pdb) p ax_bbox.ymax\n0.6283333333333333\n(Pdb) p tight_bbox.ymax - ax_bbox.ymax\n0.53900065104166661\n```\n\nI don't know what `ax_bbox` and `tight_bbox` exactly are.\n\nI just guess the algorithm to determine the figure properties do not play well with the data I want to plot. Can this be considered a bug ?\n","author":{"url":"https://github.com/blaiseli","@type":"Person","name":"blaiseli"},"datePublished":"2015-11-10T09:43:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/5456/matplotlib/issues/5456"}
| 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:00628ed0-7b59-8d9e-926d-27f90e4fdb75 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8A3C:288A2A:2A576B4:3984955:6A54900A |
| html-safe-nonce | 0da2b7fcbbd682085fab86ecce5c6d63b9318d99a4f7fd2b2d7f54bded2a35d3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QTNDOjI4OEEyQToyQTU3NkI0OjM5ODQ5NTU6NkE1NDkwMEEiLCJ2aXNpdG9yX2lkIjoiMzM2MzA4NTA2MTAwMDA0MDQ1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f759bd7264489203d4ba8cbece8aceb186f55f15d4aa93682412638f9cb2717e |
| hovercard-subject-tag | issue:116071300 |
| 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/5456/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ac60495ab5867930804abaabf6a99cb2130aff1b7ed180d155da2c4ce124518b/matplotlib/matplotlib/issues/5456 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ac60495ab5867930804abaabf6a99cb2130aff1b7ed180d155da2c4ce124518b/matplotlib/matplotlib/issues/5456 |
| og:image:alt | I'm trying to understand why sometimes I get a ValueError when using tight_layout. The code of matplotlib is too complicated for me, but I'm trying to see what's happening using pdb. It seems that ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | blaiseli |
| 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 | f8cfff6384f62259baea531c7f58bc7040f8dd92 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width