polaris.viz.add_fitted_suptitle
- polaris.viz.add_fitted_suptitle(fig, title, y=None, min_fontsize=8.0)[source]
Add a title to a figure, sized so that it fits across the figure
A title wider than the figure runs off both ends of the canvas, and is simply cropped when the figure is saved at a fixed size. What it loses is the part that distinguishes one plot from another — the elevation range, the season, the years — so the title is shrunk to fit, and wrapped onto a second line if shrinking alone is not enough. Nothing is dropped.
- Parameters:
fig (matplotlib.figure.Figure) – The figure to title
title (str) – The title, which may be longer than the figure is wide
y (float, optional) – Where to place the title in figure coordinates. A wrapped title is placed by the layout engine instead, since a fixed position would put its second line over the axes.
min_fontsize (float, optional) – The size below which the title is wrapped rather than shrunk further
- Returns:
text (matplotlib.text.Text) – The title that was added