[ Web Proxy ]
URL:
Viewing: https://matplotlib.org/stable/api/_as_gen/../../devel/MEP/../../users/../api/_tight_bbox_api.html [Back]  [Original]

matplotlib._tight_bbox — Matplotlib 3.11.2 documentation
Back to top
Search the docs ...:

matplotlib._tight_bbox#

Helper module for the bbox_inches parameter in Figure.savefig.

matplotlib._tight_bbox.adjust_bbox(fig, bbox_inches, renderer, fixed_dpi=None)[source]#

Temporarily adjust the figure so that only the specified area (bbox_inches) is saved.

It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function which restores the original values are returned.

matplotlib._tight_bbox.process_figure_for_rasterizing(fig, bbox_inches_restore, renderer, fixed_dpi=None)[source]#

A function that needs to be called when figure dpi changes during the drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with the new dpi.


Web Proxy Viewer  |  New URL  |  Original Page