get_layoutο
- Maps.get_layout(filepath=None, override=False, precision=5)ο
Get the positions of all axes within the current plot.
To re-apply a layout, use:
>>> l = m.get_layout() >>> m.set_layout(l)
Note
The returned list is only a snapshot of the current layout. It can only be re-applied to a given figure if the order at which the axes are created remains the same!
- Parameters
filepath (str or pathlib.Path, optional) β
If provided, a json-file will be created at the specified destination that can be used in conjunction with m.set_layout(β¦) to apply the layout:
>>> m.get_layout(filepath=<FILEPATH>, override=True) >>> m.apply_layout_layout(<FILEPATH>)
You can also manually read-in the layout-dict via: >>> import json >>> layout = json.load(<FILEPATH>)
override (bool) β Indicator if the file specified as βfilepathβ should be overwritten if it already exists. The default is False.
precision (int or None) β The precision of the returned floating-point numbers. If None, all available digits are returned The default is 5
- Returns
layout β A dict of the positons of all axes, e.g.: {1:(x0, y0, width height), β¦}
- Return type
dict or None