Python Seaborn教程 (Python Seaborn Tutorial)
Seaborn is a library for making statistical infographics in Python. It is built on top of matplotlib and also supports numpy and pandas data structures. It also supports statistical units from SciPy.
Seaborn是一个使用Python制作统计信息图表的库。 它基于matplotlib构建,还支持numpy和pandas数据结构。 它还支持SciPy的统计单位。
Visualization plays an important role when we try to explore and understand data, Seaborn is aimed to make it easier and the centre of the process. To put in perspective, if we say matplotlib makes things easier and hard things possible, seaborn tries to make that hard easy too, that too in a well-defined way. But seaborn is not an alternative to matplotlib, think of it as a complement to the previous.
当我们尝试探索和理解数据时,可视化起着重要作用,Seaborn的目标是使其变得更容易并且成为过程的中心。 放眼来看,如果我们说matplotlib使事情变得容易和困难的事情成为可能,seaborn也会尝试以明确的方式使困难变得容易。 但是seaborn并不是matplotlib的替代品,可以认为它是对前者的补充。
As it is built on top of matplotlib, we will often invoke matplotlib functions directly for simple plots at matplotlib has already created highly efficient programs for it.
由于它是基于matplotlib构建的,因此我们经常会直接调用matplotlib函数以获取简单的图,因为matplotlib已经为其创建了高效程序。
The high-level interface of seaborn and customizability and variety of backends for matplotlib combined together makes it easy to generate publication-quality figures.
完美的,可定制的高级界面以及各种matplotlib后端组合在一起,使生成出版物质量数据变得容易。
为什么选择Seaborn? (Why Seaborn?)
Seaborn offers a variety of functionality which makes it useful and easier than other frameworks. Some of these functionalities are:
Seaborn提供了多种功能,使其比其他框架更有用和更容易。 其中一些功能是:
- A function to plot statistical time series data with flexible estimation and representation of uncertainty around the estimate 绘制具有灵活估计的统计时间序列数据并在估计周围表示不确定性的功能
- Functions for visualizing univariate and bivariate distributions or for comparing them between subsets of data 用于可视化单变量和双变量分布或在数据子集之间进行比较的函数
- Functions that visualize matrices of data and use clustering algorithms to discover structure in those matrices 可视化数据矩阵并使用聚类算法发现这些矩阵中的结构的函数
- High-level abstractions for structuring grids of plots that let you easily build complex visualizations