Tile Figures

Curtesy of https://stackoverflow.com/questions/61503168/how-to-tile-matplotlib-figures-evenly-on-screen

screen_geometry(monitor=0)
set_figure_geometry(fig, backend, x, y, w, h)
tile_figures(cols=3, rows=2, screen_rect=None, tile_offsets=None)

Tile figures. If more than cols*rows figures are present, cols and rows are adjusted. For now, a Qt- or Tk-backend is required.

import matplotlib matplotlib.use(‘Qt5Agg’) matplotlib.use(‘TkAgg’)

Parameters
  • cols – Number of cols, rows shown. Will be adjusted if the number of figures is larger than cols*rows.

  • rows – Number of cols, rows shown. Will be adjusted if the number of figures is larger than cols*rows.

  • screen_rect – A 4-tuple specifying the geometry (x,y,w,h) of the screen area used for tiling (in pixels). If None, the system’s screen is queried using the screeninfo module.

  • tile_offsets – A 2-tuple specifying the offsets in x- and y- direction. Can be used to compensate the title bar height.

test(n_figs=10, backend='Qt5Agg', **kwargs)