python语言基础实验_实验二Python语言基础函数包练习.docx

实验二

Python

语言基础函数包练习

姓名:

季鹏

班级:

1208

学号:

2012301630030

实验目的

1

熟练掌握

Python

语言基础函数包

,

math

NumPy

SciPy

Matplotlib

函数包的使用

实验内容

练习

1

基本统计可视化:

Step 1.

导入编程所需要函数包:

#

第二次练习

,

基础

python

函数工具包

import numpy as

np import scipy as spy

import matplotlib.mlab as mlab import

matplotlib.pyplot as pit

Step 2.

柱状图町视化:

#simulate the data

mu’ sigma = 100^ 15

x = mu + sigma*np.random.randn(10000)

#

draw the histogram of thw data

bins” patches = pit.hist(x^

50,

nfacecolor='greealpha=0.75)

#

add a

1

best fit' line

y = mlab.normpdf( bins

丿

mu

丿

sigma)

1 = pit.plot(bins» y

丿

'

广丿

linewidth

1)

pit.xlabel('Smarts')

pit 

pit

广

m{Histogram\ of\ IQ:}\ \mu=100

>

\ \sigma=15$

1

) plt

0e03])

pit•grid(True)

pit•show()

对视化结杲(将图粘贴到这个位置人

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值