Commit 8efa93c
committed
contrib_graph: fix layout warnings and improve subplot spacing
The monthly activity heatmap and pie chart legend were overlapping,
making both unreadable. Additionally, matplotlib's tight_layout()
generated warnings about incompatible axes due to the pie chart
legend being positioned outside normal subplot bounds.
Switch from tight_layout() to constrained_layout which properly handles
elements positioned outside axes bounds. This modern matplotlib approach
automatically calculates optimal spacing without manual hspace/wspace
parameters.
Additional improvements:
- Truncate long contributor names in heatmap to 20 chars max
- Reduce heatmap y-axis label font size to 9pt
- Adjust pie chart legend position slightly right (bbox_to_anchor 1.05)
This eliminates the UserWarning and ensures all graph elements are
clearly readable without overlap.
Generated-by: Claude AI
Signed-off-by: Luis Chamberlain <[email protected]>1 parent 2651ab3 commit 8efa93c
1 file changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
| 253 | + | |
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | 258 | | |
261 | 259 | | |
262 | 260 | | |
263 | 261 | | |
264 | 262 | | |
265 | | - | |
266 | 263 | | |
267 | 264 | | |
268 | 265 | | |
| |||
386 | 383 | | |
387 | 384 | | |
388 | 385 | | |
389 | | - | |
| 386 | + | |
390 | 387 | | |
391 | 388 | | |
392 | 389 | | |
| |||
441 | 438 | | |
442 | 439 | | |
443 | 440 | | |
444 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
445 | 447 | | |
446 | 448 | | |
447 | 449 | | |
| |||
1033 | 1035 | | |
1034 | 1036 | | |
1035 | 1037 | | |
1036 | | - | |
1037 | | - | |
1038 | 1038 | | |
1039 | 1039 | | |
1040 | 1040 | | |
| |||
0 commit comments