Answers for "sns heatmap save figure"

3

python how to save a Seaborn plot into a file

# Basic syntax:
plt.savefig("output.png")

# Example usage:
plt.figure()
plt.plot(range(5))
plt.savefig("output.png", dpi=300)

# Note, savefig comes from matplotlib.pyplot and plt is an 
# 	abbreviation for this, e.g. import matplotlib.pyplot as plt
Posted by: Guest on August-11-2020
0

save a seaborn heatmap

swarm_plot = sns.swarmplot(...)
fig = swarm_plot.get_figure()
fig.savefig(...)
Posted by: Guest on April-14-2020

Python Answers by Framework

Browse Popular Code Answers by Language