Python绘制六种可视化图表详解,三维图最炫酷!你觉得呢?

Python绘制六种可视化图表详解,三维图最炫酷!你觉得呢?

可视化图表有相当多的种类,但常见的图表仅如下所示,其他图表则更为复杂,主要基于以下组合和转换。对于初学者来说,很容易被这个官网上种类繁多的图表吓到,因为图表种类太多,几种图表绘制方法很容易混淆。

[En]

There are quite a variety of visual charts, but the common ones are only the following, and the others are more complex, mostly based on the following combinations and transformations. For beginners, it is easy to be frightened by the many types of charts on this official website, because there are too many kinds of charts, several chart drawing methods are likely to be confused.

因此,在这里,我特别总结了六种常见的基本图表类型,通过比较学习可以为你奠定坚实的基础。

[En]

Therefore, here, I have specially summarized six common basic chart types, which you can lay a solid foundation through comparative learning.

私信回复【数据分析】可获取数据分析相关书籍

  1. 折线图

画一个折线图,如果你没有很多数据,它会是之字形的,但一旦你的数据集长大了,就像我们下面的例子一样,有100个点,所以我们用肉眼看到的将是一条平滑的曲线。

[En]

Draw a line chart, which will be zigzag if you don’t have a lot of data, but once your data set grows up, as in our example below, there are 100 points, so what we see with the naked eye will be a smooth curve.

这里我绘制三条线,只要执行三次 plt.plot 就可以了。

  1. 散点图

事实上,散点图和折线图是相同的原理。将散点图中的点用一条线连接起来就是折线图。因此,要绘制散点图,只需设置线型即可。

[En]

In fact, the scatter chart and the line chart are the same principle. Connecting the points in the scatter chart with a line is a line chart. So to draw a scatter chart, you just need to set the linetype.

注意:这里我也绘制三条线,和上面不同的是,我只一个 plt.plot 就可以了。

  1. 直方图

直方图对我们来说并不陌生。在这里,小明增加了在一张图片中绘制两个频率直方图的难度。这在实际场景中应该也会遇到,因为比较起来真的很方便,是吗?

[En]

The histogram is no stranger to us. Here Xiaoming makes it more difficult to draw two frequency histograms in one picture. This should also be encountered in the actual scene, because it is really convenient to compare, is there?

  1. 柱状图

同样的,简单的柱状图,我就不画了,这里画三种比较难的图。

4.1 并列柱状图

4.2 叠加柱状图

  1. 饼图

5.1 普通饼图

5.2 嵌套饼图

5.3 极轴饼图

要说酷炫,极轴饼图也是数一数二的了,这里肯定也要学一下。

  1. 三维图

6.1 绘制三维散点图

6.2 绘制三维平面图

你觉得那个炫酷呢?

Original: https://www.cnblogs.com/amengduo/p/9586216.html
Author: 刘小子
Title: Python绘制六种可视化图表详解,三维图最炫酷!你觉得呢?

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/9817/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

免费咨询
免费咨询
扫码关注
扫码关注
联系站长

站长Johngo!

大数据和算法重度研究者!

持续产出大数据、算法、LeetCode干货,以及业界好资源!

2022012703491714

微信来撩,免费咨询:xiaozhu_tec

分享本页
返回顶部