How does one save python panda scatter_matrix as a figure? -


i have dataframe forms scatter_matrix, can't seem save image. how save it?

import pandas pd my_scatter = pd.scatter_matrix(my_dataframe, diagonal="kde") 

how save my_scatter?

assuming using matplotlib:

import pandas pd import numpy np # necessary example if don't use no poblem import matplotlib.pyplot plt  # random data my_dataframe = pd.dataframe(np.random.randn(1000, 4), columns=['a', 'b', 'c', 'd'])  # plotting funciton my_scatter = pd.scatter_matrix(my_dataframe, diagonal="kde")  # save figure (this can path). stands save in codes directory. plt.savefig(r"figure_1.png") 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -