Book review: “Matplotlib for Python developers” by Sandro Tosi
January 27th, 2010 at 4:32 pmDisclaimer: this book (in electronic format) was provided to me for review by Packt publishing
matplotlib is the most popular plotting library for Python, and rightly so. It produces extremely high-quality plots suitable for publication, and thus, coupled with numpy and scipy is one of the major driving forces in the scientific Python community, which gets more and more active in the past few years.
The library has a comprehensive reference documentation, but few high-quality tutorials. This is the niche this book attempts to fill. It is divided into two main parts. The first (about 1/3 of the book) serves as a tutorial to matplotlib, presenting its various features in an increasing level of complexity. The second part consists of:
- Tutorials on integrating matplotlib with the major GUI frameworks used for Python – there are chapters for GTK+, wxPython and PyQt. These topics are commonly sought by beginning Python programmers (as the logs of my blog clearly show).
- A chapter about “matplotlib on the web”, which is somewhat useless in my opinion, because it teaches absolutely nothing new about matplotlib.
- A chapter called “matplotlib in the real world” which is a hodgepodge of data munging and plotting examples, which is either useful or not, depending on your experience and needs.
The book could clearly use some editing of the English (the author is not a native speaker, which is fine, but means that the editors should have done a more thorough job). Also, it has a peculiar organization – sub-chapters and sections aren’t numbered, which is very unusual and confusing, and makes cross references impossible.
All in all, I can see how this book could be useful to some users. Mainly, I think, for scientists who don’t want to google everything and to wade through docs and tutorials and want everything in a single place. But for Python hackers seeking to just make some plots, I doubt it’s of great value. All the information is available online, and if you know how to look for it, there will be no trouble finding what you need, way faster than reading through this book.
Related posts:

January 29th, 2010 at 15:39
I ordered the book, and I found it too elementary. It addresses just to beginers.
I was interested in mplot3d, but it does not deal with.
March 20th, 2010 at 13:39
@Eli: thanks for the review of the book! Yep, I faced many problem with the editors, that several times tried to disrupt even the meaning of some pieces (and, just for the reference, even them were not native english, sigh) and not for “strange” layout problems.
I find some of your remarks correct (like the sections un-numbered), but for the contents please also note that the cut of the book was already decided by Packt (i.e. it is meant to be a book for those willing to use mpl in their applications) and I had not that much freedom.
@gab: 3D was added officially in Matplotlib only in mid September 2009, and at that time, the book was already finished and in the hands of the editor, so I was not able to add any reference to it.
April 22nd, 2010 at 15:29
IT would be helpful to know if the book covers real time plotting or just plots displayed once and not updated
April 23rd, 2010 at 06:03
@Neil: yes, it has a section on real-time updating plots