O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Interactive Applications Using Matplotlib

Book Description

Don't just see your data, experience it!

  • Bring your users and your data closer with interactive visualizations using Matplotlib and Python
  • Create user interfaces from scratch without needing a GUI toolkit, or insert new visualizations into your existing applications
  • Pick up interactive aspects of Matplotlib and learn how widgets can be used to interact visually with data

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.

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