Book Image

Mastering matplotlib

By : Duncan M. McGreggor, Duncan M McGreggor
Book Image

Mastering matplotlib

By: Duncan M. McGreggor, Duncan M McGreggor

Overview of this book

Table of Contents (16 chapters)
Mastering matplotlib
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Event handling


We now have a good background for some practical work with matplotlib events. We are now ready to explore the nitty-gritty. Let's begin with the list of events that matplotlib supports:

Event name

Class

Description

button_press_event

MouseEvent

The mouse button is pressed

button_release_event

MouseEvent

The mouse button is released

draw_event

DrawEvent

The canvas draw occurs

key_press_event

KeyEvent

A key is pressed

key_release_event

KeyEvent

A key is released

motion_notify_event

MouseEvent

Motion of the mouse

pick_event

PickEvent

An object in the canvas is selected

resize_event

ResizeEvent

The figure canvas is resized

scroll_event

MouseEvent

The scroll wheel of the mouse is rolled

figure_enter_event

LocationEvent

The mouse enters a figure

figure_leave_event

LocationEvent

The mouse leaves a figure

axes_enter_event

LocationEvent

The mouse enters an axes object

axes_leave_event

LocationEvent

The mouse leaves an axes object

Note that...