Here is my review
I was given a copy of Matplotlib Plotting Cookbook by Alexandre Devert and asked to review it. Thanks PACKT! Here is my review.
I think the code examples in Chapter 1 alone are worth the price of admission. Here is a video of me walking through the Chapter 1 code examples:
You’ll notice the typical fare here: bar, line and pie graphs along with some more complex boxplot, histogram, horizontal bar, scatter and triangle graphs, all in various colors. For reference, here are the excerpted commands called to produce these graphs:
Chapter 2 is all about customization e.g. via matplotlibrc. Here is a video of me walking through the Chapter 2 code examples:
For reference, here is the sample matplotlibrc included with the matplotlib distribution (lib/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc):
As you can see, there are a lot of knobs you can turn here.
Chapter 3 is all about “annotations”. Here is a video of me walking through the Chapter 3 code examples:
“Annotations” includes related topics such as adding shapes and controlling tick spacing and labeling.
Chapter 4 is all about “working with figures”. Here is a video of me walking through the Chapter 4 code examples:
“Working with figures” includes obvious topics like
subplot and less obvious topics like setting the aspect ratio.
Chapter 5 is all about “working with file output”. For reference, here are some of the images produced by the examples in this chapter (I wrote
jpg files instead of
png files due to a problem with my libpng: RuntimeError: Could not create write struct.)
Also covered in this chapter is pdf output.
Chapter 6 is all about “working with maps”.
This chapter also introduces the imshow command.
Chapter 7 is all about “working with 3D figures”.
For reference, here are the excerpted commands called to produce these graphs:
Chapter 8 is all about working with the “user interface” interactively.
Additionally, all of the popular graphical windowing environments are discussed: Tkinter, wxWidgets, GTK, Pyglet (three out of four of which I was able to install; GTK 2 vs GTK 3 confused me and I ran out of time debugging it.