"Introduction to Data Mining" experimental class - the second experiment, the data processing of Matplotlib

Second experiment, the data processing Matplotlib

First, the purpose of the experiment

1. Understand the basic functions of the library matplotlib

2. Mastering matplotlib library

Second, the experimental tool:

1. Anaconda

2. Numpy,matplotlib

Three, Matplotlib Profile

Matplotlib contains dozens of different modules, such as matlab, mathtext, finance, dates, etc., and is the most commonly used pylot drawing module

Fourth, the experiment content

1. Draw sinusoidal, and provided the title, the name of the coordinate axis, the coordinate axis range

image.png

2. the same coordinate system and plotted curve be distinguished by a variety of style, width, color

image.png

3. Draw multi-axis chart, is about multiple sub drawing in the same drawing board.

image.png

4. histograms plotted (own definition data)

image.png

5. Draw scattergram

image.png

6. Draw boxplots

image.png

7. Optional Problem (try matplotlib library of other functions such as 2D, 3D, etc.)

2D

image.png

3D

image.png

Five experiments summarized (write harvest this experiment, problems encountered, etc.)

本次实验接触的是matplotlib库,主要使用了pyplot。显然Python是很智能和强大的,一句pyplot.plot(x,y)便将对应的函数图像绘制了出来。在学习过程中,遇到的散点图盒状图不熟悉,便自行搜索了解了下,发现还是图像方便提取信息。一大堆数据可能很难分析得出有价值的结论,而使用pyplot将数据绘图展示,便做到了直观有效。
另外,3D绘图展示的效果很炫酷。

Reproduced in: https: //www.cnblogs.com/wonker/p/11062618.html

Guess you like

Origin blog.csdn.net/weixin_34132768/article/details/93709056