Skip to content

[Doc]: layout_engine description #24518

Closed

Description

@oscargus

Documentation Link

https://matplotlib.org/stable/api/layout_engine_api.html

Problem

I do not really get the following sentence:

This is like a draw callback, however when printing we disable the layout engine for the final draw and it is useful to know the layout engine while the figure is being created, in particular to deal with colorbars.

Suggested improvement

I can think that it would first help to split it as

This is like a draw callback. However, when printing we disable the layout engine for the final draw and it is useful to know the layout engine while the figure is being created, in particular to deal with colorbars.

But the really unclear thing to me is the "and". Should that be "as"?

This is like a draw callback. However, when printing we disable the layout engine for the final draw as it is useful to know the layout engine while the figure is being created, in particular to deal with colorbars.

Not sure I fully get that sentence either (nor if it is correct anymore), but it seems to make a bit more sense anyway.

Activity

  1. jklymak commented on Nov 20, 2022

    @jklymak
    Member

    The punctuation is bad, but the "and" is correct - it is two reasons we consider layout engines different than a draw callback.

  2. story645 commented on Nov 20, 2022

    @story645
    Member

    Can this be split out into two sentences then? I'd write it but I'm not sure what the fill ins are

    This is like a draw callback (link to wherever we explain draw callbacks), however when printing we disable the layout engine for the final draw [because...]. Knowing the layout engine while the figure is being created, in particular to deal with colorbar, [allows us to ...]

  3. jklymak commented on Nov 20, 2022

    @jklymak
    Member

    This makes it all explicit:

    This is like a draw callback but with two differences.  First, when printing we disable the layout engine for the final draw. 
    Second, it is useful to know the layout engine while the figure is being created.  In particular, colorbars are made differently
     with different layout engines (for historical reasons).
    
  4. modified the milestones: v3.6-doc, v3.6.3 on Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions