网站优化哪个公司好,wordpress 添加关键词,进行seo网站建设,科技公司网站欣赏实验二Python语言基础函数包练习实验 Python语言基础函数包练习#xff1a;1208 学号#xff1a;实验目的1、Python语言包#xff0c;如math、NumPySciPy和Matplotlib等函数包的使用实验内容统计可视化Step 1. 导入编程所需要包#xff1a;Step 2. 柱状图可视化#xff1a…实验二Python语言基础函数包练习实验 Python语言基础函数包练习1208 学号实验目的1、Python语言包如math、NumPySciPy和Matplotlib等函数包的使用实验内容统计可视化Step 1. 导入编程所需要包Step 2. 柱状图可视化可视化结果(将图粘贴到这个位置)Step 3. 散点图可视化可视化结果(将图粘贴到这个位置)Step 4box-plot可视化可视化结果(将图粘贴到这个位置)Step 5: 三次样条插值可视化结果(将图粘贴到这个位置)练习内容期末考试的“scores.csv”字段信息如下fscore期末考试成绩groupe分组组别class班级score1第一次平时成绩score2第二次平时成绩score3第三次平时成绩score最终综合成绩分别画出四个成绩的柱状图是否满足正态分布分别拟合第一次、第二次、第三次成绩和期末考试成绩之间的关系按照班级和组别做boxplot,每一组和每一之间成绩的浮动。提示1 读取csv文件import csvin_file open(scores.csv, r)csv_reader csv.reader(in_file, delimiter,)# read the header infoheader csv_reader.next()print header代码#coding UTF-8import numpy as npimport scipy as spyimport matplotlib.mlab as mlabimport matplotlib.pyplot as pltfrom scipy.optimize import leastsqimport pylab as plimport csvin_file open(E:\studtstudylearn\python\gis\Experiment2\Experiment2\scores.csv,r)csv_readercsv.reader(in_file,delimiter,)# read the header infoheader csv_reader.next()#print header#defineID[]group[]Class[]fscore[]score1[]score2[]score3[]score[]#read datafor line in csv_reader:#ingnore firstlineif csv_reader.line_num0:continueID.append(line[0])fscore.append(line[1])group.append(float(line[2]))Class.append(float(line[3]))score1.append(float(line[4]))score2.append(float(line[5]))score3.append(float(line[6]))score.append(float(line[7]))#print ID#print group#print scoreplt.figure(1)#score1plt.subplot(411)n1,bins1,patches1plt.hist(score1,25,normed1,facecolorgreen,alpha0.8)y1mlab.normpdf(bins1,100,15)lplt.plot(bins1,y1,r--,linewidth1)plt.xlabel(ID)plt.ylabel(score1)plt.title(Histogram of score)#score2plt.subplot(412)n1,bins1,patches1plt.hist(score2,25,normed1,facecolorred,alpha0.8)y1mlab.normpdf(bins1,100,15)lplt.plot(bins1,y1,r--,linewidth1)plt.xlabel(ID)plt.ylabel(score2)#s