13

I'm searching for a way to set a title to Pandas scatter matrix:

from pandas.tools.plotting import scatter_matrix
scatter_matrix(data, alpha=0.5,diagonal='kde') 

I tried plt.title('scatter-matrix') but it creates a new figure.

Any help is appreciated.

jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252
J.To
  • 251
  • 2
  • 4
  • 10

1 Answers1

19

I think you need suptitle:

import matplotlib.pyplot as plt
from pandas.tools.plotting import scatter_matrix

scatter_matrix(df, alpha=0.5,diagonal='kde') 
plt.suptitle('scatter-matrix')

plt.show()
jezrael
  • 822,522
  • 95
  • 1,334
  • 1,252