Jump to ratings and reviews
Rate this book

Matplotlib Plotting Cookbook

Rate this book
Learn how to create professional scientific plots using matplotlib, with more than 60 recipes that cover common use cases If you are an engineer or scientist who wants to create great visualizations with Python, rather than yet another specialized language, this is the book for you. While there are several very competent plotting packages, matplotlib is “just” a Python module. Thus, if you know some Python already, you will feel at home from the first steps on. In case you are an application writer, you won't be left out since the integration of matplotlib is covered. matplotlib is part of the Scientific Python modules collection. matplotlib provides a large library of customizable plots and a comprehensive set of backends. It tries to make easy things easy and hard things possible. You can generate plots, add dimensions to the plots, and also make the plots interactive with just a few lines of code with matplotlib. Also, matplotlib integrates well with all common GUI modules. This book is a head-first, hands-on journey into matplotlib, the complete and definite plotting package for Python. You will learn about the basic plots, how to customize them, and combine them to make sophisticated figures. Along with basic plots, you will also learn to make professional scientific plots. In this book, you will start with the common figures that are offered by most plotting packages. You will learn how to add annotations, and play with styles, colors, scales, and shapes so that you can add personality and visual punch to your graphics. You will also see how to combine several graphics. With this book you will learn how to create sophisticated visualizations with simple code. Finally, you can make your plots interactive. After reading "matplotlib Plotting Cookbook", you will be able to create the highest quality plots.

222 pages, Kindle Edition

First published January 1, 2014

2 people are currently reading
9 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (66%)
4 stars
1 (33%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 2 of 2 reviews
3 reviews
August 4, 2014
We are often get confused with text book that provides very complex materials and hard to understand. There are rarely a book that can give us a easy and step-by-step guide to get our job done. Fortunately, Packt Publishing comes with a good news!

One of the book provided by Packt is matplotlib Plotting Cookbook. It’s all about plotting your graph with matplotlib. It is an open source library massively used and supported by community worldwide. In this book, you can find any kind of plotting type. Starting from live curve, points, bar chart, pie chart, histograms, and other types of graph. A how-to draw simple graph is given in Chapter 1.

This kind of matplotlib library is based on Python programming language. Don’t worry about the difficulty when starting graph for the first time. Python is an intuitive computer programming languange and it is easy to learn.

In the next chapter, the author, Alexandre Devert, depicts customization for color and pattern of our chart. We can also control marker style and size, or even creating our own color maps for plotted graph. Like other book published by Packt, all steps are briefly described and very well understood :)

In Chapter 3, we will find many instructions to modify annotations for our graph. Formula annotation can be employed using Latex-style notations. The book also describes guides to add label to axis, text, legend, and grid behind the chart. Every part is clearly illustrated by “How to do it” subsection and supported with “How it works … ” part in each section. Chapter 4 will drive us to customization of the figure.

We can save our generated graph from matplotlib to file. The supported file format are png, svg, or pdf file. We can follow these guides in Chapter 5. This book is also completed with a story about working with 2D and 3D figures Chapter 6 and 7, respectively. The last chapter, we can integrate our work with Python user interface library. matplotlib have an friendly interface to Tkinter, wxWidgets, GTK, and Pyglet.
Profile Image for Umut Karcı.
2 reviews1 follower
April 23, 2014
MatPlotLib Cookbook for Humans
I've been reading this book for last 15 days, almost finished it and I must say, it's really helping me to understand the library. I'm a good python programmer but until the last month I wasn't have any experience with matplotlib. When I first got the book I was expecting it to jump to advanced stuff but no, it was well prepared. I used the book to learn the library even it is a cookbook. Why I said it was well prepared? You know, there are many cookbooks in the market for many purposes, they mostly lack the balance between beginner and advanced people, also another problem is most of them don't have good explanations. Well, this book has questions and answers and small paragraphs for explaining how it works. When I started the book ,it was my midterm week, I didn't pushed hard but more I get close to middle of the book, I had the feeling of interest. I'm a CS student and I know plotting will be very important to me, I'm very glad to have this book and read it. I'll suggest this book and the library to all my classmates (they also learning python).
PS: I'm developing django web applications in my free time. Sometimes I need some graphs to show to users, until today I was using javascript based graphs but for that I was sending data to userspace. From now on, I'm going to use matplotlib, Middle part (5) was about saving to files and as far as I learned, it's very easy. I'm currently turning all my javascript code to python thanks to this book. Also I develop small pyqt apps too, they were lacking of graphs. Well, no more. Even though the book uses WxWidgets, because lib has qt backend too, it will be very easy for me to apply to qt.
4.5/5 (minus 0.5 is for book is only 200+ pages long[still longer than most], I hope they'll release a second edition with more questions.)
Displaying 1 - 2 of 2 reviews

Can't find what you're looking for?

Get help and learn more about the design.