File tree Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Open diff view settings
Expand file tree Collapse file tree 2 files changed +15
-4
lines changed Open diff view settings
Original file line number Diff line number Diff line change @@ -57,12 +57,12 @@ Here are the events that you can connect to, the class instances that
5757are sent back to you when the event occurs, and the event descriptions
5858
5959
60- ======================= ======================================================================================
60+ ======================= =============================================================================================
6161Event name Class and description
62- ======================= ======================================================================================
62+ ======================= =============================================================================================
6363'button_press_event' :class: `~matplotlib.backend_bases.MouseEvent ` - mouse button is pressed
6464'button_release_event' :class: `~matplotlib.backend_bases.MouseEvent ` - mouse button is released
65- 'draw_event' :class: `~matplotlib.backend_bases.DrawEvent ` - canvas draw
65+ 'draw_event' :class: `~matplotlib.backend_bases.DrawEvent ` - canvas draw (but before screen update)
6666'key_press_event' :class: `~matplotlib.backend_bases.KeyEvent ` - key is pressed
6767'key_release_event' :class: `~matplotlib.backend_bases.KeyEvent ` - key is released
6868'motion_notify_event' :class: `~matplotlib.backend_bases.MouseEvent ` - mouse motion
@@ -73,7 +73,7 @@ Event name Class and description
7373'figure_leave_event' :class: `~matplotlib.backend_bases.LocationEvent ` - mouse leaves a figure
7474'axes_enter_event' :class: `~matplotlib.backend_bases.LocationEvent ` - mouse enters a new axes
7575'axes_leave_event' :class: `~matplotlib.backend_bases.LocationEvent ` - mouse leaves an axes
76- ======================= ======================================================================================
76+ ======================= =============================================================================================
7777
7878.. _event-attributes :
7979
Original file line number Diff line number Diff line change @@ -1428,6 +1428,17 @@ class DrawEvent(Event):
14281428 In addition to the :class:`Event` attributes, the following event
14291429 attributes are defined:
14301430
1431+
1432+ In most backends callbacks subscribed to this callback will be
1433+ fired after the rendering is complete but before the screen is
1434+ updated. Any extra artists drawn to the canvas's renderer will
1435+ be reflected without an explicit call to ``blit``.
1436+
1437+ .. warning ::
1438+
1439+ Calling ``canvas.draw`` and ``canvas.blit`` in these callbacks may
1440+ not be safe with all backends and may cause infinite recursion.
1441+
14311442 Attributes
14321443 ----------
14331444 renderer : `RendererBase`
You can’t perform that action at this time.
0 commit comments