fitted_raster_dpi

ell1fit.plotting.fitted_raster_dpi(fig)[source]

The resolution fig can be rasterized at without an unbounded canvas.

RASTER_DPI for anything of a size somebody chose – every figure built from figure_size() is orders of magnitude below the ceiling. It only bites on a figure whose size is a consequence rather than a decision, which in this package means a corner plot: it grows by about 2.1 inches per parameter in each direction, so a twenty-epoch fit asks for a canvas 13000 pixels on a side.

The resolution is then reduced continuously to hold the canvas at MAX_CANVAS_PX, and never below MIN_RASTER_DPI – past that point the labels stop being legible, and a figure nobody can read is not a cheaper figure but a wasted one.

Parameters:
figmatplotlib.figure.Figure

The figure about to be written.

Returns:
float

Resolution in dots per inch.