Figure 10 is implemented in Python data visualization

introduction

 

The beauty of art is rooted in the information they convey. Sometimes, reality is not what we see or perceive. Leonardo da Vinci (Da Vinci) and Picasso (Picasso) and other artists through their extraordinary work of art with a specific subject, trying to get people closer to reality.

 

Data scientists are not inferior to the artist. They used data visualization way of painting, trying to show the hidden patterns in the data or the expression of views of the data. Even more interesting is that once any visual access to the content, data, human beings have a more intense perception, cognition and communication.

 

In scientific data, there are a variety of tools for visualization. In this article, I showed you use Python to achieve various visual charts.

 

How can Python in the realization of visualization?

 

Not many things involved! Python has given way you can easily visualize - just two exclusive means of visualization libraries (libraries), commonly known as matplotlib and seaborn. have you heard of it?

 

Matplotlib: Python-based graphics library provides a complete 2D and 3D graphics support is limited matplotlib. This is useful to publish high-quality images in a cross-platform interactive environment. It can also be used for animation.

 

Seaborn: Seaborn is a Python for creating graphical information rich and attractive library statistics. This library is based on the matplotlib. Seaborn offers a variety of features, such as built-in themes, color palette, functions and tools to achieve single-factor, two-factor linear regression, data matrix, statistical time series such as visualization, to allow us to further build complex visualization.

 

What can I do different visualization?

 

Just published shortly in the "A comprehensive guide on Data Visualization", we introduce the most commonly used visualization techniques. Before further in-depth study, if you have not read this book, we recommend that you refer to this book.

 

The following Python code is output thereto. I used the following set of data to create these visual.

 

Import data set

 

1. Histogram

 

2. boxplot

 

Figure 3. Violin

 

4. bar

 

5. FIG polyline

 

6. Stacked Column

 

7. Scatter

 

8. FIG Bubble

 

9. Pie

 

10. FIG heat

 

你可以尝试绘制基于两个变量的热图,如X轴为性别,Y轴为BMI,数据点为销售值。

 

结语

 

现在,你肯定已经意识到了数据可视化的美妙,为什么不自己动手试试呢?在以后的文章中,我们还将探讨用Python实现地图可视化和词云。

大数据文摘也曾经发布过用R进行数据可视化的文章,《用R语言进行数据可视化的综合指南(一)》《用R语言进行数据可视化的综合指南(二)》。大家可以参考一下,做个对比。

Guess you like

Origin www.cnblogs.com/shujuxiong/p/11183165.html