nesticot commited on
Commit
2fb71ec
·
verified ·
1 Parent(s): f716003

Update functions/PitchPlotFunctions.py

Browse files
Files changed (1) hide show
  1. functions/PitchPlotFunctions.py +7 -1
functions/PitchPlotFunctions.py CHANGED
@@ -615,7 +615,13 @@ class PitchPlotFunctions:
615
  ax_bottom_border.axis('off')
616
  ax_footer.axis('off')
617
  ax_legend.axis('off')
618
-
 
 
 
 
 
 
619
  # Adjust layout and show the figure
620
  # fig.tight_layout()
621
  fig.subplots_adjust(left=0.01, right=0.99, top=0.99, bottom=0.01)
 
615
  ax_bottom_border.axis('off')
616
  ax_footer.axis('off')
617
  ax_legend.axis('off')
618
+ # Add clip path to constrain brush
619
+ for ax in fig.get_axes():
620
+ if ax.get_xlabel() == 'Horizontal Break (in)': # Identify the main plot
621
+ ax.set_clip_on(True)
622
+ ax.patch.set_clip_on(True)
623
+ for artist in ax.get_children():
624
+ artist.set_clip_on(True)
625
  # Adjust layout and show the figure
626
  # fig.tight_layout()
627
  fig.subplots_adjust(left=0.01, right=0.99, top=0.99, bottom=0.01)