@@ -56,16 +56,26 @@ def extract_valid_file_paths(changed_files_entry):
56
56
57
57
# Save the pie chart of kernel components with most bugs to a variable
58
58
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
+
61
69
plt .ylabel ('' )
70
+
71
+ # Make sure everything fits well
62
72
plt .tight_layout ()
63
73
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' )
66
76
67
77
# Print the top 10 most buggy files
68
78
print ("Top 10 Files with the Most Bug Fixes:\n " , top_valid_buggy_files )
69
79
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 ( )
0 commit comments