|
|
|
@ -46,59 +46,10 @@ special
|
|
|
|
|
2.实现了了基础UI与底层计算的接入
|
|
|
|
|
3.目前UI界面太丑,太简陋
|
|
|
|
|
4.底层计算目前只实现了ISBN精确查询,需要扩充的内容很多
|
|
|
|
|
import matplotlib
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import pandas as pd
|
|
|
|
|
plt.rcParams['font.sans-serif'] = ['SimHei']
|
|
|
|
|
def work(x):
|
|
|
|
|
# ********** Begin *********#
|
|
|
|
|
DFx = pd.DataFrame(x)
|
|
|
|
|
DFx.plot.box()
|
|
|
|
|
plt.figure(figsize=(10,10))
|
|
|
|
|
plt.title('居民消费金额对比')
|
|
|
|
|
plt.grid(linestyle=':',alpha=0.3)
|
|
|
|
|
plt.savefig('project/step7/image/user.png')
|
|
|
|
|
|
|
|
|
|
3.
|
|
|
|
|
import matplotlib
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
import numpy as np
|
|
|
|
|
plt.rcParams['font.sans-serif']=['SimHei']
|
|
|
|
|
def work(x,y):
|
|
|
|
|
# ********** Begin *********#
|
|
|
|
|
n = ['语文','数学','英语','物理','化学','历史','政治','体育','美术','音乐']
|
|
|
|
|
z = np.arange(len(n))
|
|
|
|
|
plt.figure(figsize=(10, 10))
|
|
|
|
|
width = 0.4
|
|
|
|
|
fig,ax = plt.subplots(figsize=(10, 10))
|
|
|
|
|
rect1 = ax.bar(z-width/2,x,color = '#3170a7',width=width,label='小明')
|
|
|
|
|
rect2 = ax.bar(z+width/2,y,color = 'pink',width=width,label='小花')
|
|
|
|
|
ax.set_ylabel('分数')
|
|
|
|
|
ax.set_title('小明与小花期末考试的各科成绩')
|
|
|
|
|
ax.set_xticks(z)
|
|
|
|
|
ax.set_xticklabels(n)
|
|
|
|
|
ax.legend()
|
|
|
|
|
plt.legend(loc='upper left')
|
|
|
|
|
plt.savefig('project/step3/image/user.png')
|
|
|
|
|
plt.close()
|
|
|
|
|
# ********** End **********#
|
|
|
|
|
6.
|
|
|
|
|
import matplotlib
|
|
|
|
|
import matplotlib.pyplot as plt
|
|
|
|
|
plt.rcParams['font.sans-serif']=['SimHei']
|
|
|
|
|
def work(x):
|
|
|
|
|
# ********** Begin *********#
|
|
|
|
|
plt.figure(figsize=(10,10))
|
|
|
|
|
labels = ['语文','数学','英语','物理','化学','历史','政治','体育','美术','音乐']
|
|
|
|
|
plt.title('小明的期末成绩各科占比')
|
|
|
|
|
max_val = max(x)
|
|
|
|
|
explode = [0.1 if val == max_val else 0 for val in x]
|
|
|
|
|
plt.pie(x,labels=labels,autopct='%.2f%%',explode=explode)
|
|
|
|
|
plt.savefig('project/step6/image/user.png')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ********** End **********#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ********** End **********#
|
|
|
|
|
4.10管理员1:
|
|
|
|
|
考虑到下周没什么时间,而这个作业11号就截止了
|
|
|
|
|
所以事情还是很紧急的
|
|
|
|
|
PPT汇报具体要求什么的4.11课上问问
|
|
|
|
|
现在急需将其完善,可以在功能上进一步简化,而图形界面能看即可
|