通过python画图

# -*- coding: utf-8 -*-

#auther tonyxiao

import numpy as np
import matplotlib.mlab as mlab
import matplotlib.pyplot as plt

X=[1,2,3,4,5,6]
Y=[a,b,c,d,e,f]
fig = plt.figure()
plt.bar(X,Y,0.4,color="green")
plt.xlabel("name")
plt.ylabel("ticket quantity")
plt.title("workload chart")


plt.show()
plt.savefig("barChart.jpg")

原文地址:https://www.cnblogs.com/latefall/p/9273878.html