I'm working, in a Jupyter Notebook, with a dataframe that's pretty large. Here is a tiny sample of what I'm dealing with.
import pandas as pd
import seaborn as sns
# Intitialise data of lists
data = [{'Month': '2020-01-01', 'Expense':1000, 'Revenue':5000, 'Building':'Stadium'},
{'Month': '2020-02-01', 'Expense':3000, 'Revenue':4000, 'Building':'Stadium'},
{'Month': '2020-03-01', 'Expense':7000, 'Revenue':5000, 'Building':'Stadium'},
{'Month': '2020-04-01', 'Expense':3000, 'Revenue':4000, 'Building':'Stadium'},
{'Month': '2020-01-01', 'Expense':5000, 'Revenue':6000, 'Building':'Casino'},
{'Month': '2020-02-01', 'Expense':5000, 'Revenue':4000, 'Building':'Casino'},
{'Month': '2020-03-01', 'Expense':5000, 'Revenue':9000, 'Building':'Casino'},
{'Month': '2020-04-01', 'Expense':6000, 'Revenue':10000, 'Building':'Casino'},
{'Month': '2020-01-01', 'Expense':5000, 'Revenue':6000, 'Building':'School'},
{'Month': '2020-02-01', 'Expense':5000, 'Revenue':4000, 'Building':'School'},
{'Month': '2020-03-01', 'Expense':5000, 'Revenue':9000, 'Building':'School'},
{'Month': '2020-04-01', 'Expense':6000, 'Revenue':10000, 'Building':'School'},
{'Month': '2020-01-01', 'Expense':5000, 'Revenue':6000, 'Building':'Hospital'},
{'Month': '2020-02-01', 'Expense':5000, 'Revenue':4000, 'Building':'Hospital'},
{'Month': '2020-03-01', 'Expense':5000, 'Revenue':9000, 'Building':'Hospital'},
{'Month': '2020-04-01', 'Expense':6000, 'Revenue':10000, 'Building':'Hospital'},
{'Month': '2020-01-01', 'Expense':5000, 'Revenue':6000, 'Building':'Arena'},
{'Month': '2020-02-01', 'Expense':5000, 'Revenue':4000, 'Building':'Arena'},
{'Month': '2020-03-01', 'Expense':5000, 'Revenue':9000, 'Building':'Arena'},
{'Month': '2020-04-01', 'Expense':6000, 'Revenue':10000, 'Building':'Arena'}]
df = pd.DataFrame(data)
df
I received some great advice from people yesterday, on how to plot this.
dfm = df.melt(id_vars=['Month', 'Building'], value_vars=['Expense', 'Revenue'])
sns.catplot(kind='bar', data=dfm, x='Month', y='value', hue='variable', col='Building')
plt.show()
Now, this works, but everything is so tiny, I can't even tell what's what.
I tried three ways to try to increase the size of each graph.
1)
sns.set(rc = {'figure.figsize':(15,8)})
p = sns.lineplot(data = df)
plt.gcf().set_size_inches(15, 8)
from matplotlib import rcParams
rcParams['figure.figsize'] = 15,8
p = sns.lineplot(data = df)
None of these code samples did anything to change the size of any plot. Has anyone here encountered this before? Any thoughts on how to increase the size of each of these plots?