欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Some useful python code

程序员文章站 2022-05-08 19:29:14
...

创建绘制并保存Python boxplot子图

# Create a figure instance
# fig = plt.figure(1, figsize=(9, 6))
# Create an axes(subplot) instance
# ax = fig.add_subplot(111)
# ax.boxplot(machine1)
# fig.savefig('machine_1_'+'boxplot1.png')

关闭屏幕显示

# use boxplot to show the data   
# close the in screen print of the figure 
plt.ioff() 
# oprn the on screen print of the figure
plt.ion()

转载于:https://www.jianshu.com/p/5c43d99ccb12