All Questions
2 questions
-2
votes
1
answer
217
views
How can I save several plots in a for loop? [duplicate]
I am trying to save several plots in a for loop but I got this error: 'FileNotFoundError: [Errno 2] No such file or directory: '8/2020/graph.png'
Here is my code:
for i in names.columns:
fig, ax = ...
1
vote
2
answers
2k
views
Dynamic naming using savefig
I have a df with some number of columns, and I'm creating bivariate plots using a loop like so:
for col in df.columns[2:len(df.columns)]:
sns.factorplot(x='xvar', y=col, data=df)
sns.despine(...