pandas.scatter_matrix()
個の数字をプロットすると、私はMemoryError: In RendererAgg: Out of memory
と打ちます。pandas.scatter_matrix()を閉じるにはfigure
通常、私は使用します。
plt.close(fig)
むしろそれは軸がオブジェクトを返し、私が使用しているメモリを解放するように、matplotlib
数字を閉鎖するが、matplotlib
姿をpandas.scatter_matrix()
返しません。たとえば、次のように
import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(1000, 4), columns=['A','B','C','D']) ax = pd.scatter_matrix(df, alpha=0.2)
私はこの数字を閉じるにはどうすればよいですか?