figlayout#

figlayout(fig=None, tight=True, keep=None, **kwargs)[source]#

Alias to both fig.set_layout_engine() and fig.subplots_adjust().

Parameters:
  • fig (Figure) – the figure (by default, use current)

  • tight (bool) – passed to fig.set_layout_engine(); default True

  • keep (bool) – if True, then leave tight layout on; else, turn it back off to allow additional layout updates (which requires a render, so can be slow)

  • kwargs (dict) – passed to fig.subplots_adjust()

Example:

fig,axs = sc.get_rows_cols(37, make=True, tight=False) # Create 7x6 subplots, squished together
sc.figlayout(bottom=0.3)
New in version 1.2.0.
New in version 3.1.1: keep defaults to True to avoid the need to refresh