Skip to content

Commit 1027fe3

Browse files
committed
update
1 parent 1724ffe commit 1027fe3

3 files changed

+16
-6
lines changed

analysis/bpf/pie_most_buggy_componenet.py

+16-6
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,26 @@ def extract_valid_file_paths(changed_files_entry):
5656

5757
# Save the pie chart of kernel components with most bugs to a variable
5858
fig, ax = plt.subplots(figsize=(10, 6))
59-
component_bug_counts.plot(kind='pie', autopct='%1.1f%%', startangle=90, colors=plt.cm.Paired.colors, ax=ax)
60-
# plt.title('Kernel Implementation Components with the Most Bugs')
59+
60+
# Increase font sizes for the title and labels, and make the legend bigger
61+
component_bug_counts.plot(kind='pie', autopct='%1.1f%%', startangle=90, colors=plt.cm.Paired.colors, ax=ax, textprops={'fontsize': 15})
62+
63+
# Make legend bigger
64+
# plt.legend(title="Components", fontsize=12, title_fontsize='13')
65+
66+
# Adjust title size if necessary
67+
# plt.title('Kernel Components with the Most Bugs', fontsize=16)
68+
6169
plt.ylabel('')
70+
71+
# Make sure everything fits well
6272
plt.tight_layout()
6373

64-
# Save the figure to a variable
65-
v = fig
74+
# Save the figure to a PDF file with larger font and legend
75+
plt.savefig('imgs/kernel_components_most_buggy_pie_chart.png')
6676

6777
# Print the top 10 most buggy files
6878
print("Top 10 Files with the Most Bug Fixes:\n", top_valid_buggy_files)
6979

70-
# # Show the pie chart (saved in variable 'v')
71-
plt.savefig('imgs/kernel_components_most_buggy_pie_chart.pdf')
80+
# Show the pie chart (optional for debugging purposes)
81+
plt.show()
1.88 KB
Binary file not shown.
56.5 KB
Loading

0 commit comments

Comments
 (0)