Beispiel #1
0
# Build list of labels for the bars

myplot.xlabels = []
for r in results:
    myplot.xlabels.append(r[0])

# Build a list of lists of y values
# and a list of the labels for each y value

myplot.ylists = []
myplot.ylistlabels = []

for i in range(1, len(column_names)):
    yl = []
    for r in results:
        val = 100.0 * myplot.nonetozero(r[i])
        yl.append(val)
    myplot.ylists.append(yl)
    myplot.ylistlabels.append(column_names[i])

# Misc labels and names

myplot.title = database.upper() + ' CPU Working Hours ' + day.capitalize(
) + 's'
myplot.ylabel1 = 'CPU % Utilization'
myplot.yticksuffix = '%'
myplot.filename = day.lower() + '.png'

# Run stacked bar graph

myplot.stacked_bar()
Beispiel #2
0
# Build list of labels for the bars
           
myplot.xlabels = []
for r in results:
    myplot.xlabels.append(r[0])
        
# Build a list of lists of y values
# and a list of the labels for each y value

myplot.ylists =  []
myplot.ylistlabels = []
    
for i in range(1,len(column_names)):
    yl=[]
    for r in results:
        val = 100.0 * myplot.nonetozero(r[i])
        yl.append(val)
    myplot.ylists.append(yl)
    myplot.ylistlabels.append(column_names[i])

# Misc labels and names

myplot.title = database.upper()+' CPU Working Hours '+day.capitalize()+'s'
myplot.ylabel1 = 'CPU % Utilization'
myplot.yticksuffix = '%'
myplot.filename = day.lower()+'.png'

# Run stacked bar graph
    
myplot.stacked_bar()