matplotlib - How can I save a dendrogram plot from scipy.cluster.hierarchy dendrogram as a file? -


as doing agglomerative clustering, retain dendrograms rendered later review.

as far can see, scipy.cluster.hierarchy.dendrogram() function not return matlplotlib figure object can saved. best way of achieving this?

found out catch current figure

mathplotlib.pyplot.gcf() 

and save

mathplotlib.pyplot.savefig(filename) 

Comments

Popular posts from this blog

python 3.x - Mapping specific letters onto a list of words -

javascript - jquery or ashx not working -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -