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

Function update_rect

galleries/examples/event_handling/viewlims.py:71–75  ·  view source on GitHub ↗
(rect, ax)

Source from the content-addressed store, hash-verified

69
70
71def update_rect(rect, ax): # Let the rectangle track the bounds of the zoom axes.
72 xlo, xhi = ax.get_xlim()
73 ylo, yhi = ax.get_ylim()
74 rect.set_bounds((xlo, ylo, xhi - xlo, yhi - ylo))
75 ax.figure.canvas.draw_idle()
76
77
78# Connect for changing the view limits.

Callers

nothing calls this directly

Calls 4

get_xlimMethod · 0.45
get_ylimMethod · 0.45
set_boundsMethod · 0.45
draw_idleMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…