#!/usr/bin/env python # coding: utf-8 # In[1]: import pandas as pd import numpy as np import seaborn as sns from mplsoccer import Pitch, VerticalPitch import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from functions import plot_heatmap # In[2]: x = np.random.randint(1,101,500) # In[3]: df = pd.read_csv('europaFinal.csv') df.head() # In[4]: fig = plt.figure(figsize=(10,10),constrained_layout = True) gs = fig.add_gridspec(nrows = 3, ncols = 4) ax1 = fig.add_subplot(gs[0,0:2]) ax1.set_title('[0,0]') boxplot = sns.boxplot(x = x, ax = ax1) ax3 = fig.add_subplot(gs[0,2]) ax3.set_title('[0,2]') plot_heatmap(heat_df = df, teamId = 'Villarreal', p_type='Pass', ax=ax3) ax4 = fig.add_subplot(gs[0,3]) ax4.set_title('[0,3]') plot_heatmap(heat_df = df, teamId = 'Manchester United', p_type='Pass', ax=ax4) ax5 = fig.add_subplot(gs[1:,0]) ax5.set_title('[1,0]') ax6 = fig.add_subplot(gs[1,1]) ax6.set_title('[1,1]') ax7 = fig.add_subplot(gs[1,2]) ax7.set_title('[1,2]') ax8 = fig.add_subplot(gs[1,3]) ax8.set_title('[1,3]') ax10 = fig.add_subplot(gs[2,1]) ax10.set_title('[2,1]') ax11 = fig.add_subplot(gs[2,2]) ax11.set_title('[2,2]') ax12 = fig.add_subplot(gs[2,3]) ax12.set_title('[2,3]') ax12.scatter(5,2) # In[ ]: