Skip to content

Commit 325c31d

Browse files
committed
updtae
1 parent ab29593 commit 325c31d

7 files changed

+11
-11
lines changed

analysis/bpf/pie_commits.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ def plot_commit_classification_pie():
1818
value_counts = value_counts[:max_labels]._append(pd.Series([value_counts[max_labels:].sum()], index=['Other']))
1919

2020
# Truncate labels for better readability
21-
truncated_labels = [label[:20] + '...' if len(label) > 10 else label for label in value_counts.index]
21+
truncated_labels = [label[:15] + '...' if len(label) > 10 else label for label in value_counts.index]
2222

2323
# Plot the pie chart
24-
fig, ax = plt.subplots(figsize=(7, 5))
24+
fig, ax = plt.subplots(figsize=(6, 4))
2525
ax.pie(value_counts, labels=truncated_labels, autopct='%1.1f%%', startangle=90)
2626
# ax.set_title('Commit Classification', fontsize=12)
2727

@@ -40,10 +40,10 @@ def plot_commit_complexity_pie():
4040
value_counts = value_counts[:max_labels]._append(pd.Series([value_counts[max_labels:].sum()], index=['Other']))
4141

4242
# Truncate labels for better readability
43-
truncated_labels = [label[:20] + '...' if len(label) > 10 else label for label in value_counts.index]
43+
truncated_labels = [label[:15] + '...' if len(label) > 10 else label for label in value_counts.index]
4444

4545
# Plot the pie chart
46-
fig, ax = plt.subplots(figsize=(7, 5))
46+
fig, ax = plt.subplots(figsize=(6, 4))
4747
ax.pie(value_counts, labels=truncated_labels, autopct='%1.1f%%', startangle=90)
4848
# ax.set_title('Commit Complexity', fontsize=12)
4949

@@ -78,7 +78,7 @@ def plot_implementation_component_pie():
7878
truncated_labels = [label[:30] + '...' if len(label) > 10 else label for label in value_counts.index]
7979

8080
# Plot the pie chart
81-
fig, ax = plt.subplots(figsize=(7, 5))
81+
fig, ax = plt.subplots(figsize=(6, 4))
8282
ax.pie(value_counts, labels=truncated_labels, autopct='%1.1f%%', startangle=90)
8383

8484
# Save the figure
@@ -96,10 +96,10 @@ def plot_logic_component_pie():
9696
value_counts = value_counts[:max_labels]._append(pd.Series([value_counts[max_labels:].sum()], index=['Other']))
9797

9898
# Truncate labels for better readability
99-
truncated_labels = [label[:20] + '...' if len(label) > 10 else label for label in value_counts.index]
99+
truncated_labels = [label[:15] + '...' if len(label) > 10 else label for label in value_counts.index]
100100

101101
# Plot the pie chart
102-
fig, ax = plt.subplots(figsize=(7, 5))
102+
fig, ax = plt.subplots(figsize=(6, 4))
103103
ax.pie(value_counts, labels=truncated_labels, autopct='%1.1f%%', startangle=90)
104104
# ax.set_title('Major Logic Component', fontsize=12)
105105

@@ -144,10 +144,10 @@ def plot_usecases_or_submodule_pie():
144144
value_counts = value_counts[:max_labels]._append(pd.Series([value_counts[max_labels:].sum()], index=['Other']))
145145

146146
# Truncate labels for better readability
147-
truncated_labels = [label[:20] + '...' if len(label) > 10 else label for label in value_counts.index]
147+
truncated_labels = [label[:15] + '...' if len(label) > 10 else label for label in value_counts.index]
148148

149149
# Plot the pie chart
150-
fig, ax = plt.subplots(figsize=(7, 5))
150+
fig, ax = plt.subplots(figsize=(6, 4))
151151
ax.pie(value_counts, labels=truncated_labels, autopct='%1.1f%%', startangle=90)
152152
# ax.set_title('Use Cases or Submodule Events', fontsize=12)
153153

analysis/bpf/timeline_commits_3m.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def plot_frequency_timeline(field_name, title, max_labels, threshold, save_path)
131131
ax.set_xlabel('Time (3-Month Intervals)', fontsize=14)
132132
ax.set_ylabel('Number of Commits', fontsize=14)
133133

134-
truncated_labels = [label[:20] + '...' if len(label) > 20 else label for label in monthly_counts.columns]
134+
truncated_labels = [label[:15] + '...' if len(label) > 20 else label for label in monthly_counts.columns]
135135

136136
ax.legend(truncated_labels, loc='upper left', bbox_to_anchor=(1,1)) # Place legend outside the plot
137137

@@ -195,7 +195,7 @@ def plot_usecases_timeline(title, save_path, max_labels=8, threshold=0.005):
195195
ax.set_ylabel('Number of Commits', fontsize=14)
196196

197197
# Truncate long labels for the legend
198-
truncated_labels = [label[:20] + '...' if len(label) > 20 else label for label in monthly_counts.columns]
198+
truncated_labels = [label[:15] + '...' if len(label) > 20 else label for label in monthly_counts.columns]
199199

200200
# Add the legend with truncated labels
201201
ax.legend(truncated_labels, loc='upper left', bbox_to_anchor=(1, 1)) # Place legend outside the plot
-6.13 KB
Loading
-5.43 KB
Loading
Loading
-7.41 KB
Loading
Loading

0 commit comments

Comments
 (0)