I have a dataframe with keys of 'time_period', 'teamID', 'winrate'.
I am trying to plot the relationship between teamID and winrate, for each time period.
I do this with:
g = sns.catplot(x="teamID", y="winrate", kind="bar", col='time_period',
col_wrap=1, data=df, height=5, aspect=2.5)
Works great, but here is the problem. Each time period does not necessarily contain the same teams. But, each output graph still uses every team in the database as a label for the X axis. For each period, my plot has a bunch of barless positions on the X axis because those teams don't exist within that period.
Is there a way to make each period's plot only show the teams that are applicable to that period?
Thank you.