赞
踩
目录
Python使用matplotlib绘制透明背景的可视化图像并保存透明背景的可视化结果(transparent background)
#保存透明背景的可视化结果(transparent background)
- import matplotlib.pyplot as plt
-
- # employee growth year over year
- emp_count = [3, 20, 50, 200, 350, 400]
- year = [2014, 2015, 2016, 2017, 2018, 2019]
- # plot the employee growth
- plt.plot(year, emp_count)
-
- # add axes labels and plot title
- plt.xlabel('Year')
- plt.ylabel('Employees')
- plt.title("Employee Growth YoY")
-
- # save the plot as a PNG image
- plt.sav
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。