def arrows(self, xstart, ystart, xend, yend, *args, ax=None, **kwargs): validate_ax(ax) quiver = arrows(xstart, ystart, xend, yend, *args, ax=ax, vertical=self.vertical, **kwargs) return quiver
font_kwargs = {'size': 20, 'va': 'center', 'ha': 'center', 'fontproperties': fm_rubik.prop} # title ax_title1 = fig.add_axes((0, title1_bottom, 1, TITLE_HEIGHT)) ax_title1.axis('off') ax_title1.text(LEFT1 + TOP_WIDTH / 2, 0.5, f'{pitch_length}m X {pitch_width}m\nWide pitch', color='#b94e45', **font_kwargs) ax_title1.text(left2 + TOP_WIDTH / 2, 0.5, 'StatsBomb\n(120 X 80)', color=pitch2.line_color, **font_kwargs) ax_title1.text(left3 + TOP_WIDTH / 2, 0.5, f'{pitch_length3}m X {pitch_width3}m\nNarrow pitch', color='#56ae6c', **font_kwargs) ax_title1.set_xlim(0, 1) ax_title1.set_ylim(0, 1) arrows(LEFT1 + TOP_WIDTH / 2, 0.1, left2 + TOP_WIDTH / 2, 0.1, color='#b94e45', ax=ax_title1) arrows(left3 + TOP_WIDTH / 2, 0.1, left2 + TOP_WIDTH / 2, 0.1, color='#56ae6c', ax=ax_title1) ax_title2 = fig.add_axes((0, title2_bottom, 1, TITLE_HEIGHT)) ax_title2.axis('off') ax_title2.text(LEFT4 + BOTTOM_WIDTH / 2, 0.5, f'{pitch_length4}m X {pitch_width4}m\nLong pitch', color='#bc7d39', **font_kwargs) ax_title2.text(left5 + BOTTOM_WIDTH / 2, 0.5, 'StatsBomb\n(120 X 80)', color=pitch5.line_color, **font_kwargs) ax_title2.text(left6 + BOTTOM_WIDTH / 2, 0.5, f'{pitch_length6}m X {pitch_width6}m\nShort pitch', color='#677ad1', **font_kwargs) ax_title2.set_xlim(0, 1) ax_title2.set_ylim(0, 1) arrows(LEFT4 + BOTTOM_WIDTH / 2, 0.1, left5 + BOTTOM_WIDTH / 2, 0.1, color='#bc7d39', ax=ax_title2)