Spaces:
Running
Running
Update functions/PitchPlotFunctions.py
Browse files
functions/PitchPlotFunctions.py
CHANGED
|
@@ -652,14 +652,14 @@ class PitchPlotFunctions:
|
|
| 652 |
# Add legend to ax_legend
|
| 653 |
ncols = min(len(legend_handles), 6)
|
| 654 |
if len(items_in_order) <= 5:
|
| 655 |
-
ax_legend.legend(handles=legend_handles, bbox_to_anchor=(0.1, 0.
|
| 656 |
else:
|
| 657 |
-
ax_legend.legend(handles=legend_handles, bbox_to_anchor=(0.1, 0.
|
| 658 |
|
| 659 |
# Add comparison note below the legend if comparison data is present
|
| 660 |
if compare_df is not None and len(compare_df) > 0 and compare_year is not None:
|
| 661 |
-
ax_legend.text(0.5,
|
| 662 |
-
ha='center', va='top', fontsize=
|
| 663 |
transform=ax_legend.transAxes)
|
| 664 |
|
| 665 |
# Add footer text
|
|
|
|
| 652 |
# Add legend to ax_legend
|
| 653 |
ncols = min(len(legend_handles), 6)
|
| 654 |
if len(items_in_order) <= 5:
|
| 655 |
+
ax_legend.legend(handles=legend_handles, bbox_to_anchor=(0.1, 0.5, 0.8, 0.5), ncol=ncols, fancybox=True, loc='upper center', fontsize=10, framealpha=1.0, markerscale=2, prop={'size': 10})
|
| 656 |
else:
|
| 657 |
+
ax_legend.legend(handles=legend_handles, bbox_to_anchor=(0.1, 0.5, 0.8, 0.5), ncol=ncols, fancybox=True, loc='upper center', fontsize=10, framealpha=1.0, markerscale=2, prop={'size': 10})
|
| 658 |
|
| 659 |
# Add comparison note below the legend if comparison data is present
|
| 660 |
if compare_df is not None and len(compare_df) > 0 and compare_year is not None:
|
| 661 |
+
ax_legend.text(0.5, 0.1, f'Note: Dashed ellipses show comparison to {compare_year}',
|
| 662 |
+
ha='center', va='top', fontsize=10, fontstyle='italic',
|
| 663 |
transform=ax_legend.transAxes)
|
| 664 |
|
| 665 |
# Add footer text
|