How to close pandas.scatter_matrix() figure
After a bit of investigation, I realized that I could just use:
plt.close()
with no argument to close the current figure, or:
plt.close('all')
to close all of the opened figures.
I'm hitting MemoryError: In RendererAgg: Out of memory when I plot several pandas.scatter_matrix() figures. 
Normally I use:
plt.close(fig) 
to close matplotlib figures, so that I release the memory used, but pandas.scatter_matrix() does not return a matplotlib figure, rather it returns the axes object. For example:

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)

How do I close this figure?