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

Chapter 4. Event Handling and Interactive Plots

This chapter marks the beginning of our transition into specialized topics. While we will continue making references to the preceding overview, the subsequent chapters will focus on taking you deeper into the domain of advanced matplotlib usage.

In this chapter, we will delve into matplotlib events and interactive plots and cover the following topics:

  • A general overview of event-based systems

  • The anatomy of an event loop

  • The GUI toolkit event loop basics

  • Event loops in IPython and matplotlib

  • Event handling in matplotlib

  • Events for mouse, keyboard, axes, figures, and picking

  • Compound events

The material presented here will be pulled from matplotlib's artist and backend layers, and it should provide a nice starting point for the vast world of user interaction in data visualization.

To follow along with this chapter's code, clone the notebook's repository and start up IPython by using the following code:

$ git clone https://github.com/masteringmatplotlib...