50种Matplotlib科研论文绘图合集,含代码实现

本文分享了50个令人眼前一亮的Matplotlib可视化项图表,每个图表都有其相应的生成代码,并将它们分为了关联、偏差、排序、分布、组成、变化、分组等7个类别,是科研作图时很好的参考。

本文由lqy上传,翻译自http://machinelearningplus.com

来源链接(含代码):

https://www.machinelearningplus.com/plots/top-50-matplotlib-visualizations-the-master-plots-python/

项目链接(中文翻译+代码):

https://www.kesci.com/home/project/5f4b3f146476cf0036f7e51e

数据集链接:

https://www.kesci.com/home/dataset/5f4f6d4e3a0788003c4df2ce

作者认为,一个优秀的可视化,需要具备以下特征:

  • 在不歪曲事实的情况下传达正确和必要的信息。
  • 设计简单,不必太费力就能理解它。
  • 从审美角度支持信息而不是掩盖信息。
  • 信息没有超负荷。

而以下可视化,都是基于上面这4点制作的。

这些图表根据可视化目标的7个不同情景进行分组,目录如下:

50种Matplotlib科研论文绘图合集,含代码实现

以上所有图表的生成代码都包含在项目中,并且包含了一些必要的讲解。

50种Matplotlib科研论文绘图合集,含代码实现

以下正文

关联 (Correlation)

散点图(Scatter plot)

50种Matplotlib科研论文绘图合集,含代码实现

带边界的气泡图(Bubble plot with Encircling)

50种Matplotlib科研论文绘图合集,含代码实现

带线性回归最佳拟合线的散点图

(Scatter plot with linear regression line of best fit)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

抖动图 (Jittering with stripplot)

50种Matplotlib科研论文绘图合集,含代码实现

计数图 (Counts Plot)

50种Matplotlib科研论文绘图合集,含代码实现

边缘直方图 (Marginal Histogram)

50种Matplotlib科研论文绘图合集,含代码实现

边缘箱形图 (Marginal Boxplot)

50种Matplotlib科研论文绘图合集,含代码实现

相关图 (Correllogram)

50种Matplotlib科研论文绘图合集,含代码实现

矩阵图 (Pairwise Plot)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

偏差 (Deviation)

50种Matplotlib科研论文绘图合集,含代码实现

发散型条形图 (Diverging Bars)

50种Matplotlib科研论文绘图合集,含代码实现

发散型文本 (Diverging Texts)

50种Matplotlib科研论文绘图合集,含代码实现

发散型包点图 (Diverging Dot Plot)

50种Matplotlib科研论文绘图合集,含代码实现

带标记的发散型棒棒糖图

(Diverging Lollipop Chart with Markers)

50种Matplotlib科研论文绘图合集,含代码实现

面积图 (Area Chart)

50种Matplotlib科研论文绘图合集,含代码实现

排序 (Ranking)

有序条形图 (Ordered Bar Chart)

50种Matplotlib科研论文绘图合集,含代码实现

棒棒糖图 (Lollipop Chart)

50种Matplotlib科研论文绘图合集,含代码实现

包点图 (Dot Plot)

50种Matplotlib科研论文绘图合集,含代码实现

坡度图 (Slope Chart)

50种Matplotlib科研论文绘图合集,含代码实现

哑铃图 (Dumbbell Plot)

50种Matplotlib科研论文绘图合集,含代码实现

分布 (Distribution)

连续变量的直方图 (Histogram for Continuous Variable)

50种Matplotlib科研论文绘图合集,含代码实现

类型变量的直方图

(Histogram for Categorical Variable)

50种Matplotlib科研论文绘图合集,含代码实现

密度图 (Density Plot)

50种Matplotlib科研论文绘图合集,含代码实现

直方密度线图

(Density Curves with Histogram)

50种Matplotlib科研论文绘图合集,含代码实现

Joy Plot

50种Matplotlib科研论文绘图合集,含代码实现

分布式包点图

(Distributed Dot Plot)

50种Matplotlib科研论文绘图合集,含代码实现

箱形图 (Box Plot)

50种Matplotlib科研论文绘图合集,含代码实现

包点+箱形图 (Dot + Box Plot)

50种Matplotlib科研论文绘图合集,含代码实现

小提琴图 (Violin Plot)

50种Matplotlib科研论文绘图合集,含代码实现

人口金字塔

(Population Pyramid)

50种Matplotlib科研论文绘图合集,含代码实现

分类图 (Categorical Plots)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

组成 (Composition)

华夫饼图 (Waffle Chart)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

饼图 (Pie Chart)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

树形图 (Treemap)

50种Matplotlib科研论文绘图合集,含代码实现

条形图 (Bar Chart)

50种Matplotlib科研论文绘图合集,含代码实现

变化 (Change)

时间序列图 (Time Series Plot)

50种Matplotlib科研论文绘图合集,含代码实现

带波峰波谷标记的时序图

(Time Series with Peaks and Troughs Annotated)

50种Matplotlib科研论文绘图合集,含代码实现

自相关和部分自相关图

(Autocorrelation (ACF) and Partial Autocorrelation (PACF) Plot)

50种Matplotlib科研论文绘图合集,含代码实现

交叉相关图

(Cross Correlation plot)

50种Matplotlib科研论文绘图合集,含代码实现

时间序列分解图

(Time Series Decomposition Plot)

50种Matplotlib科研论文绘图合集,含代码实现

多个时间序列

(Multiple Time Series)

50种Matplotlib科研论文绘图合集,含代码实现

使用辅助 Y 轴来绘制不同范围的图形

(Plotting with different scales using secondary Y axis)

50种Matplotlib科研论文绘图合集,含代码实现

带有误差带的时间序列

(Time Series with Error Bands)

50种Matplotlib科研论文绘图合集,含代码实现

50种Matplotlib科研论文绘图合集,含代码实现

堆积面积图

(Stacked Area Chart)

50种Matplotlib科研论文绘图合集,含代码实现

未堆积的面积图

(Area Chart UnStacked)

50种Matplotlib科研论文绘图合集,含代码实现

日历热力图

(Calendar Heat Map)

50种Matplotlib科研论文绘图合集,含代码实现

季节图

(Seasonal Plot)

50种Matplotlib科研论文绘图合集,含代码实现

分组 (Groups)

树状图 (Dendrogram)

50种Matplotlib科研论文绘图合集,含代码实现

簇状图 (Cluster Plot)

50种Matplotlib科研论文绘图合集,含代码实现

安德鲁斯曲线 (Andrews Curve)

50种Matplotlib科研论文绘图合集,含代码实现

平行坐标

(Parallel Coordinates)

50种Matplotlib科研论文绘图合集,含代码实现

本文来源:和鲸社区,仅用于学术分享,著作权归作者所有。如有侵权,请联系后台作删文处理。