Information visualization ( Also called drawing ) It is one of the most important tasks in data analysis . It may be part of the exploration process , for example , Help us find outliers 、 Necessary data conversion 、 Get the relevant model idea etc. . in addition , Making an interactive data visualization may be the ultimate goal of the work .Python There are many libraries for static or dynamic data visualization , But my main concern here is matplotlib(http://matplotlib.org/) And libraries based on it .
matplotlib Is a desktop drawing package for creating publishing quality charts ( Mainly 2D aspect ). The project is by John Hunter On 2002 Year initiated , The purpose is to Python Construct a MATLAB Graphical interface .matplotlib and IPython Community cooperation , Simplified from IPython shell( Including the present Jupyter notebook) Interactive drawing .matplotlib Support many different functions on various operating systems GUI Back end , It can also export pictures to various common vectors (vector) And grating (raster) chart :PDF、SVG、JPG、PNG、BMP、GIF etc. . Except for a few , Most of the figures in this book are generated with it .
Over time ,matplotlib Derived a number of data visualization tool sets , They use matplotlib As the bottom layer . One of them is seaborn(http://seaborn.pydata.org/), We'll learn about it later in this chapter .
The easiest way to learn the code cases in this chapter is in Jupyter notebook Interactive drawing . stay Jupyter notebook Execute the following statement in :
%matplotlib notebook