I would like my code to iterate through columns to make one plot for each column. I have the below code to draw plot for one column, but I do not know how to use this code to loop through other columns and generate plots for all columns. Any idea?
Here's my code:
import seaborn as sns
sns.set()
fig, ax = plt.subplots()
sns.set(style="ticks")
sns.boxplot(x='Location', y='Height [cm]', data=df)
sns.despine(offset=10, trim=True)
fig.set_size_inches(22,14)
plt.savefig('Height.pdf', bbox_inches='tight')
This is what my data looks like:
Location Height Length Width
A 150 95 18
A 148 122 25
A 162 127 16
B 155 146 32
B 148 112 21
B 154 108 30
C 160 127 22
C 148 138 36
C 159 142 28