You are previewing Interactive Applications Using Matplotlib.
O'Reilly logo
Interactive Applications Using Matplotlib

Book Description

Don't just see your data, experience it!

In Detail

Matplotlib makes it easy to generate plots, histograms, power spectra, bar charts, error charts, and other kinds of plots, with just a few lines of code.

Interactive Applications Using Matplotlib will teach you how to turn your plots into fully interactive applications for data exploration and information synthesis. After being introduced to the plotting library, you'll learn how to create simple figures and come to grips with how they work. After these first steps, we will start work on a weather radar application.

Next, you will learn about Matplotlib's event handler to add not only keymaps and mouse actions but also custom events, enabling our radar application to transition from a simple visualization tool into a useful severe storm tracking application, complete with animations and widgets. The book will conclude with enhancements from the GUI toolkit of your choice.

What You Will Learn

  • Add keymaps, mouse button actions, and custom events to your application

  • Build and record animations of your plots

  • Enhance your data display with buttons,sliders, and other widgets

  • Insert Matplotlib figures into any GUI application

  • Create a session recorder for your application

  • Learn about Matplotlib's event handler to add custom events

  • See Matplotlib as more than just a plotting library

  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. Interactive Applications Using Matplotlib
      1. Table of Contents
      2. Interactive Applications Using Matplotlib
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Conventions
        5. Reader feedback
        6. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Introducing Interactive Plotting
        1. Installing Matplotlib
        2. Show() your work
        3. Interactive navigation
        4. Interactive plotting
        5. Scripted plotting
        6. Getting help
          1. Gallery
          2. Mailing lists and forums
        7. From front to backend
          1. Interactive versus non-interactive
          2. Anti-grain geometry
          3. Selecting your backend
        8. The Matplotlib figure-artist hierarchy
          1. Canvassing the figure
          2. The menagerie of artists
            1. Primitives
            2. Collections
        9. Summary
      9. 2. Using Events and Callbacks
        1. Making the connection
        2. The big event
        3. Breaking up is the easiest thing to do
        4. Keymapping
        5. Picking
        6. Data editing
        7. User events
        8. Editor events
        9. Summary
      10. 3. Animations
        1. A short history
        2. The fastest draw in the west
        3. The animation module
        4. Advanced animations
          1. Event source
          2. Timers
          3. Blitting
          4. Recipes
            1. Tails
            2. Fades
        5. Saving animations
          1. Notes about codecs and file formats
          2. Simultaneous animations
          3. How animations are saved
          4. Session recorder
        6. Summary
      11. 4. Widgets
        1. Built-in widgets
          1. Slider
          2. Button
          3. Check buttons
          4. Radio button
          5. Lasso
          6. LassoSelector
          7. RectangleSelector
          8. SpanSelector
          9. Cursor
          10. format_coord()
        2. Third-party tools
          1. mpldatacursor
          2. Glue
          3. Plot.ly, ggplot, prettyplotlib, and Seaborn
        3. Summary
      12. 5. Embedding Matplotlib
        1. The revelation
        2. Through a glass, darkly
          1. Tinker tailor soldier pylab_setup()
          2. Canvas materials
        3. Bars, menus, and sliders – four ways
          1. GTK
          2. Tkinter
          3. wxWidgets
          4. Qt
        4. Matplotlib in your app
          1. GTK
          2. Tkinter
          3. wxWidgets
          4. Qt
        5. Summary
      13. Index