All Questions
3 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
1
answer
92
views
Could not save whole figure of barplot with long yticklabel
I want to save a barplot, but found it was clipped when save it to a file.
import seaborn as sns
import matplotlib.pyplot as plt
tips = sns.load_dataset("tips")
sns.set_theme(font_scale=1.6)...
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(...