Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pandas - scatter matrix set title

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.

like image 935
J.To Avatar asked Sep 30 '16 08:09

J.To


1 Answers

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()
like image 141
jezrael Avatar answered Sep 19 '22 14:09

jezrael