def doAnchoreGraph(image):
print(image)
info = infoAnchoreLog(image)
window = Toplevel()
window.title('Report '+ image)
window.geometry("1000x1000")
data = {'CVE': ['1. CRITICAL','2. HIGH','3. MEDIUM','4. LOW'],
'Frequency': [info[1],info[2],info[3],info[4]]
}
df = DataFrame(data,columns=['CVE','Frequency'])
figure = plt.Figure(figsize=(9,8), dpi=100)
ax = figure.add_subplot(111)
bar = FigureCanvasTkAgg(figure, window)
bar.get_tk_widget().pack(side=tk.LEFT, fill=tk.BOTH)
df = df[['CVE','Frequency']].groupby('CVE').sum()
df.plot(kind='bar', legend=True, ax=ax)
ax.set_title("Scanned Image: "+ image)
filename = "anchorescan-" + image + ".png"
figure.savefig(filename)
Anyone knows how to increase the limit of the Y axis? mine is capped at 20 for some reason. Here's my sample output: doAnchoreGraph.png