Giter Site home page Giter Site logo

Comments (5)

rougier avatar rougier commented on May 17, 2024

The reason is that I did not know about constrained_layout... What's the difference with tight_layout?

from cheatsheets.

timhoffm avatar timhoffm commented on May 17, 2024

Simply speaking: Constrained layout does a better layouting job in many cases.

From constrained layout guide:

constrained_layout is similar to tight_layout, but uses a constraint solver to determine the size of axes that allows them to fit.

But that's only the technical implementation. @jklymak I don't think we have an explanation what that means for the user. Would be nice to add a sentence to the constrained layout guide as well.

from cheatsheets.

jklymak avatar jklymak commented on May 17, 2024

constrained layout works with multi-axes colorbars, it makes axes match size whether they have colorbars or not, it works with nested gridspecs. It works with uneven subplot layouts (i.e. 2 axes in one column, and 3 axes in another column). It also works interactively - i.e. when the axes is resized, which I don't think tight_layout does. Overall, I think most users want constrained_layout versus tight_layout - I'm not aware of situations where tight_layout is better, but happy for reports.

from cheatsheets.

rougier avatar rougier commented on May 17, 2024

And is possible to remove white margins in the process? (like pdfcrop does)

from cheatsheets.

jklymak avatar jklymak commented on May 17, 2024

Sure if you set hpad and wpad to zero.

from cheatsheets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.