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

Class DrawEvent

lib/matplotlib/backend_bases.py:1206–1230  ·  view source on GitHub ↗

An event triggered by a draw operation on the canvas. In most backends, callbacks subscribed to this event will be fired after the rendering is complete but before the screen is updated. Any extra artists drawn to the canvas's renderer will be reflected without an explicit call

Source from the content-addressed store, hash-verified

1204
1205
1206class DrawEvent(Event):
1207 """
1208 An event triggered by a draw operation on the canvas.
1209
1210 In most backends, callbacks subscribed to this event will be fired after
1211 the rendering is complete but before the screen is updated. Any extra
1212 artists drawn to the canvas's renderer will be reflected without an
1213 explicit call to ``blit``.
1214
1215 .. warning::
1216
1217 Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may
1218 not be safe with all backends and may cause infinite recursion.
1219
1220 A DrawEvent has a number of special attributes in addition to those defined
1221 by the parent `Event` class.
1222
1223 Attributes
1224 ----------
1225 renderer : `RendererBase`
1226 The renderer for the draw event.
1227 """
1228 def __init__(self, name, canvas, renderer):
1229 super().__init__(name, canvas)
1230 self.renderer = renderer
1231
1232
1233class ResizeEvent(Event):

Callers 2

drawMethod · 0.90
test_parent_axes_removalFunction · 0.90

Calls

no outgoing calls

Tested by 1

test_parent_axes_removalFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…