Swipe to navigate through the chapters of this book
Visualization is a universal tool for investigating and communicating results of computational studies, and it is hardly an exaggeration to say that the end product of nearly all computations – be it numeric or symbolic – is a plot or a graph of some sort. It is when visualized in graphical form that knowledge and insights can be most easily gained from computational results. Visualization is therefore a tremendously important part of the workflow in all fields of computational studies.
Please log in to get access to this content
Although the stateful API may be convenient and simple for small examples, the readability and maintainability of code written for stateful APIs scales poorly, and the context-dependent nature of such code makes it hard to rearrange or reuse. I therefore recommend to avoid it altogether, and to only use the object-oriented API.
The Matplotlib resource file, matplotlibrc, can be used to set default values of many Matplotlib parameters, including which back end to use. The location of the file is platform dependent. For details, see http://matplotlib.org/users/customizing.html .
For Max OS X users, %config InlineBackend.figure_format=’retina’ is another useful option, which improves the quality of the Matplotlib graphics when viewed on retina displays.
An alternative to passing a coordinate and size tuple to add_axes, is to pass an already existing Axes instance.
A nice visualization of all the available color maps is available at http://wiki.scipy.org/Cookbook/Matplotlib/Show_colormaps . This page also describes how to create new color maps.
- Plotting and Visualization
- Sequence number
- Chapter number
- Chapter 4