# -*- coding: utf-8 -*-
import matplotlib.pyplot as plt
import datetime
import matplotlib as mpl
import numpy as np
mpl.rcParams['font.sans-serif']=['SimHei']
mpl.rcParams['font.family'] = 'sans-serif'
def timestamp(plt,pngname):
now = datetime.datetime.now()
time=now.strftime('%Y%m%d%H%M%S')
plt.savefig("%s_%s.png"%(pngname,time))
group = [1, 2, 3, 4, 5, 6]
data = [473, 1023, 2039, 1544, 1979, 5]
title='MTTR(mm)'
plt.ylabel(title)
plt.title(title)
plt.xticks((1, 2, 3, 4, 5, 6),('AF00', 'AF01', 'AF02','AF03','AF04','JR01'))
plt.bar(group, data, 0.5, color='y', align='center')
now = datetime.datetime.now()
time=now.strftime('%Y%m%d%H%M%S')
#timestamp(plt,title)
import matplotlib.pyplot as plt
import datetime
import matplotlib as mpl
import numpy as np
mpl.rcParams['font.sans-serif']=['SimHei']
mpl.rcParams['font.family'] = 'sans-serif'
def timestamp(plt,pngname):
now = datetime.datetime.now()
time=now.strftime('%Y%m%d%H%M%S')
plt.savefig("%s_%s.png"%(pngname,time))
group = [1, 2, 3, 4, 5, 6]
data = [473, 1023, 2039, 1544, 1979, 5]
title='MTTR(mm)'
plt.ylabel(title)
plt.title(title)
plt.xticks((1, 2, 3, 4, 5, 6),('AF00', 'AF01', 'AF02','AF03','AF04','JR01'))
plt.bar(group, data, 0.5, color='y', align='center')
now = datetime.datetime.now()
time=now.strftime('%Y%m%d%H%M%S')
#timestamp(plt,title)
plt.show()