FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: new constrained_layout causes axes to go invisible(?) · Issue #22264 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: new constrained_layout causes axes to go invisible(?) #22264

Closed

Description

Bug summary

Since #20426, plt.figure(constrained_layout=True).subplots(3) (or layout="constrained") shows no axes whatsoever.
attn @jklymak, I guess :)

Code for reproduction

See above.

Actual outcome

Blank figure.

Expected outcome

Not blank figure.

Additional information

No response

Operating system

fedora

Matplotlib Version

HEAD, bisects to #20426.

Matplotlib Backend

mplcairo

Python version

310

Jupyter version

No response

Installation

git checkout

Activity

  1. added
    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
    topic: geometry managerLayoutEngine, Constrained layout, Tight layout
    on Jan 19, 2022
  2. jklymak commented on Jan 19, 2022

    Member

    I can't reproduce. And obviously we test CL pretty heavily, so all our tests would fail if that didn't work at all. So you must have something else in your setup causing the problem.

  3. jklymak commented on Jan 19, 2022

    Member

    (Well, OK, I didn't try and reproduce with mplcairo)...

  4. anntzer commented on Jan 19, 2022

    ContributorAuthor

    Oh, that's interesting... this only occurs with mplcairo, even though I would have thought this touched something completely orthogonal to the actual renderer (this is why I didn't think about checking that part). I'll investigate, sorry for the noise.

  5. jklymak commented on Jan 19, 2022

    Member

    Well, it is weird that it doesn't work w/ mplcairo. If there is something we need to fix, we should try before release...

  6. anntzer commented on Jan 19, 2022

    ContributorAuthor

    Do you know if the sequence of draws changed with #20426?

  7. jklymak commented on Jan 19, 2022

    Member

    Not on purpose. However I think things changed so that the layout parameters were not hard coded when the gridspecs are created. Ie the width ratios etc are done at drawtime. That allows you to change the gridspec width ratios and have it take effect. However I think this went in before #20426

  8. anntzer commented on Jan 20, 2022

    ContributorAuthor

    OK, I figured out that this occured because I was doing some weird dance to try to reuse renderer instances in order to not invalidate the text layout cache (now see #22271, which doesn't immediately address the text cache but is preliminary work in that direction), but #20426 changed something and I ended up drawing to a draw-disabled renderer. I just stripped out most of the caching for now.
    Perhaps still worth figuring out exactly what changed, but I guess I can just milestone this as 3.6 for myself and have a look when I can, with less urgency.

  9. removed
    Release criticalFor bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.
    on Jan 20, 2022
  10. added this to the v3.6.0 milestone on Jan 20, 2022
  11. jklymak commented on Jan 20, 2022

    Member

    I'm going to close this since it is working as expected for unpatched Matplotlib. If when adding your "weird" renderer dance you come up with a flaw in how constrained_layout is implemented, feel free to re-raise the issue, but there is nothing actionable for the rest of us (yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL