-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Open
Labels
Description
Problem
Currently, Figure.set_layout_engine only supports a hard-coded list of (string) engine names. In order to support the new "direct" layout engine, @jklymak had to patch that method (https://github.com/jklymak/mpl-direct-layout/blob/5f8549df76bf68de58c99aded3c6495754689655/src/mpl_direct_layout/_register.py#L10-L26; see #31312).
Proposed solution
It would be convenient if one could do e.g. figure.set_layout_engine("mpl_direct_layout:DirectLayoutEngine"), similarly to how one can do mpl.style.use("module.stylename"). Obviously one can already do from mpl_direct_layout import DirectLayoutEngine; figure.set_layout_engine(DirectLayoutEngine()); the point is to save the explicit import here.
Reactions are currently unavailable