nesticot commited on
Commit
8dcb1c2
·
verified ·
1 Parent(s): ca40fb3

Update functions/PitchPlotFunctions.py

Browse files
Files changed (1) hide show
  1. functions/PitchPlotFunctions.py +4 -4
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.3, 0.8, 0.7), ncol=ncols, fancybox=True, loc='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.3, 0.8, 0.7), ncol=ncols, fancybox=True, loc='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'Dashed ellipses show comparison to {compare_year}',
662
- ha='center', va='top', fontsize=11, fontstyle='italic',
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