Book Image

Interactive Applications using Matplotlib

Book Image

Interactive Applications using Matplotlib

Overview of this book

Table of Contents (12 chapters)

Chapter 4. Widgets

 

I'm telling you loosen up my buttons baby

But you keep fronting

Saying what you going do to me

But I ain't seen nothing

 
 --The Pussycat Dolls, "Buttons" (2005)

What are widgets? They are doohickeys, you know, thingamajiggers or whatchamacallits. Whatever they are, they are the visual tools by which a user can interact with your application. Humans intuitively interact with their environment through physical objects. It is perfectly natural for us to want to have knobs, buttons, and other contraptions to get things done. Up to this point, most of our interactivity has been through the keyboard or using default interactivity via the mouse. We have not added any knobs or buttons to our application in order to extend its functionality.

A word of warning before we proceed. This chapter will often exhibit feature creep. This will be necessary in order to demonstrate the features that Matplotlib provides; however, it does not mean that one should pack every single possible widget...