Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Matplotlib for Python Developers

You're reading from   Matplotlib for Python Developers Python developers who want to learn Matplotlib need look no further. This book covers it all with a practical approach including lots of code and images. Take this chance to learn 2D plotting through real-world examples.

Arrow left icon
Product type Paperback
Published in Nov 2009
Publisher Packt
ISBN-13 9781847197900
Length 308 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (14) Chapters Close

Matplotlib for Python Developers
Credits
About the Author
About the Reviewers
1. Preface
1. Introduction to Matplotlib FREE CHAPTER 2. Getting Started with Matplotlib 3. Decorate Graphs with Plot Styles and Types 4. Advanced Matplotlib 5. Embedding Matplotlib in GTK+ 6. Embedding Matplotlib in Qt 4 7. Embedding Matplotlib in wxWidgets 8. Matplotlib for the Web 9. Matplotlib in the Real World

About dependencies


As mentioned earlier, Matplotlib has its origin in scientific fields, so it is commonly used to plot huge datasets. Python's native support for long lists becomes impractical for such sizes, so Matplotlib needs better support for arrays.

NumPy, the de facto standard Python module for numerical elaborations, provides support for high performance operations even with big mathematical data types such as arrays or matrices—along with many other mathematical functions that can be useful to Matplotlib users.

NumPy has to be available to use Matplotlib.

Once we have chosen the set of user interfaces (UIs) we prefer, then we need to install the Python bindings for them. Here is a summarizing list:

User Interface (UI)

Binding

Version

Description

FLTK

pyFLTK

1.0 or higher

pyFLTK provides Python wrappers for the FLTK widgets library for use with FLTKAgg backend.

GTK+

PyGTK

2.2 or higher

PyGTK provides Python wrappers for the GTK+ widgets library to use it with the GTK or GTKAgg backend.

It is recommended to use a version higher than 2.12, for a correct memory management.

Qt

PyQt or PyQt4

3.1 or higher and for Qt4, 4.0 or higher

PyQt or PyQt4 provides Python wrappers for the Qt toolkit and is required by the Matplotlib QtAgg and Qt4Agg backends. The library is widely used on Linux and Windows.

Tk

PyTK

8.3 or higher

Python wrapper for Tcl or Tk widgets library is used in TkAgg backend.

Wx

wxPython

2.6 or higher, or

2.8 or higher

wxPython provides Python wrappers for the wxWidgets library for use with the WX and WXAgg backends. It is widely used on Linux, Mac OS X, and Windows.

Another important tool, in particular for interactive usage, is IPython. It's an interactive Python shell with a lot of useful features, such as history, commands repeating, and others. It already has a Matplotlib mode in it. We'll be using IPython in this book, so it is recommended to install it.

Some of the tools that are needed by Matplotlib are already shipped with it (in the source code as well as in the binary distributions). Here is the list of those tools:

  • AGG (version 2.4): This is the Anti-Grain Geometry rendering engine. The local copy of the library is linked with the Matplotlib code in a static way. So, there's no need to install it (as a shared library).

  • pytz (version 2007g or higher): This is used for handling the time zone for datetime Python objects. It will be installed if it's not already present in the system. It can be overridden using setup.cfg.

  • python-dateutil (version1.1 or higher): This is used for enhanced handling of the datetime Python objects. It needs to be installed if it's not already present in the system and can be overridden using setup.cfg.

Build dependencies

The following tools are needed if we're going to install Matplotlib from the source:

  • Python: Currently, only Python 2.x is supported (no Python 3 yet)

  • NumPy: Version 1.1 or higher

  • libpng: Version 1.1 or higher is needed to load or save PNG images (Windows users can skip this requirement)

  • FreeType: Version 1.4 or higher is needed for reading TrueType font files (Windows users can skip this requirement)

Note

libpng and FreeType for Windows users are already packaged in the Matplotlib Windows installer.

Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Matplotlib for Python Developers
You have been reading a chapter from
Matplotlib for Python Developers
Published in: Nov 2009
Publisher: Packt
ISBN-13: 9781847197900
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime
Modal Close icon
Modal Close icon