Skip to content

[Doc]: layout engine module tutorial #24347

Closed as not planned
Closed as not planned

Description

@story645

Documentation Link

No response

Problem

We got a shiny new layout engine module in https://matplotlib.org/devdocs/api/layout_engine_api.html in 3.6 c/0 of #20426 but there's no tutorial for it. I figure it's one of those things where if you know how to write a layout engine then the api docs are fine, but honestly I think a tutorial would at the least be useful for making it more discoverable and showing off its usability and how flexible it is.

Suggested improvement

A tutorial, or minimally an example, of making a custom layout engine. To start, something in the style of custom projections or custom units

Activity

  1. timhoffm commented on Nov 3, 2022

    @timhoffm
    Member

    Writing Lay-out Engines should be very rare. I'm not convinced writing a tutorial on that is a good investment of time. Maybe it's enough to add a sentence to the API docs: "If you plan to implement your own layout engine and need help with that, do hesitate the matplotlib developers via ...".

  2. jklymak commented on Nov 3, 2022

    @jklymak
    Member

    Yes it's hard to think of a short enough toy layout engine where this would be any better than reading the source code for our existing layout engines. Maybe someone has a simple example they can gin up, but this really isn't meant to be a user facing change, but rather something someone could write an add-on package around. Or a ready answer to "I dont like how constrained layout does X".

  3. timhoffm commented on Feb 6, 2025

    @timhoffm
    Member

    I'm closing this as not planned.

    There's a minimal description in the LayoutEngine class ("To implement a custom LayoutEngine ..."). I believe people who are interested and able to write a layout engine are experienced enough to contact us if they need additional help.

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

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions