There are many kinds of visual diagrams. This article mainly introduces the methods of drawing six visual diagrams in Python. It is very good
Visual charts, there are quite a variety of, but common also on the following several, other more complex, mostly also based on the following several combinations, transformation. For starters, it’s easy to be overwhelmed by the sheer number of chart types on the site, which can cause confusion among different chart rendering methods.
So here, I’ve compiled six common basic chart types that you can learn from by comparison.
01. Line charts
If you draw a line graph, if you don’t have a lot of data, the graph will be zigzagging, but once you have a large data set, like our example below, with 100 points, what we see with the naked eye will be a smooth curve.
Here I draw three lines, and plt.plot is done three times.
02. Scatter plot
In fact, the scatter chart and line chart are the same principle, the scatter chart points connected with lines is a line chart. So to draw a scatter plot, just set up a line.
Note: I’m also drawing three lines here, but unlike above, I’m using only one plt.plot.
03. Histogram
Histograms, you’re familiar with them. Here Xiao Ming makes it harder by drawing two frequency histograms in one diagram. This should also be encountered in the actual scene, because it is really convenient to compare, right?
4. A histogram
Similarly, I’m not going to draw simple bar charts, but I’m going to draw three more difficult ones.
4.1 Parallel bar chart
4.2 Superimposed bar chart
05. The pie chart
5.1 Ordinary pie Chart
5.2 Nested pie charts
5.3 Polar pie chart
Say cool, pole axis pie chart is also one of the best, here must also learn.
6. 3 d figure
6.1 Drawing a THREE-DIMENSIONAL scatter diagram
6.2 Draw a three-dimensional plan
conclusion
If you have any questions, please leave me a message and I will get back to you in time.