plotting and visualization making plots and static or interactive visualizations is one of the most important tasks in data analysis it may be part of the exploratory processfor examplehelping identify outliersneeded data transformationsor coming up with ideas for models for othersbuilding an interactive visualization for the web using toolkit like js (http// js org/may be the end goal python has many visualization tools (see the end of this but 'll be mainly focused on matplotlib netmatplotlib is (primarily ddesktop plotting package designed for creating publication-quality plots the project was started by john hunter in to enable matlab-like plotting interface in python hefernando perez (of ipython)and others have collaborated for many years since then to make ipython combined with matplotlib very functional and productive environment for scientific computing when used in tandem with gui toolkit (for examplewithin ipython)matplotlib has interactive features like zooming and panning it supports many different gui backends on all operating systems and additionally can export graphics to all of the common vector and raster graphics formatspdfsvgjpgpngbmpgifetc have used it to produce almost all of the graphics outside of diagrams in this book matplotlib has number of add-on toolkitssuch as mplot for plots and basemap for mapping and projections will give an example using basemap to plot data on map and to read shapefiles at the end of the to follow along with the code examples in the make sure you have started ipython in pylab mode (ipython --pylabor enabled gui event loop integration with the %gui magic brief matplotlib api primer there are several ways to interact with matplotlib the most common is through pylab mode in ipython by running ipython --pylab this launches ipython configured to be able to support the matplotlib gui backend of your choice (tkwxpythonpyqtmac www it-ebooks info