MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / process_figure_for_rasterizing

Function process_figure_for_rasterizing

lib/matplotlib/_tight_bbox.py:73–84  ·  view source on GitHub ↗

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.

(fig, bbox_inches_restore, renderer, fixed_dpi=None)

Source from the content-addressed store, hash-verified

71
72
73def process_figure_for_rasterizing(fig, bbox_inches_restore, renderer, fixed_dpi=None):
74 """
75 A function that needs to be called when figure dpi changes during the
76 drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with
77 the new dpi.
78 """
79
80 bbox_inches, restore_bbox = bbox_inches_restore
81 restore_bbox()
82 r = adjust_bbox(fig, bbox_inches, renderer, fixed_dpi)
83
84 return bbox_inches, r

Callers 2

start_rasterizingMethod · 0.90
stop_rasterizingMethod · 0.90

Calls 2

restore_bboxFunction · 0.85
adjust_bboxFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…