import scipy.stats as sci
def pearson(x,y):
r,p = stats.pearsonr(x,y)
sns.jointplot('Comedy','Adventure',pivot,kind='reg',color='g',stat_func=sci.pearsonr)
显示图标
import scipy.stats as sci
def pearson(x,y):
r,p = stats.pearsonr(x,y)
h = sns.jointplot(x.loc[:,'perimeter_mean'], x.loc[:,'area_worst'], kind="regg", color="#ce1414",stat_func=sci.pearsonr)
h.set_axis_labels('perimeter_mean', 'area_worst', fontsize=18)
# or set labels via the axes objects
#h.ax_joint.set_xlabel('perimeter_mean', fontweight='bold')
# also possible to manipulate the histogram plots this way, e.g.
#h.ax_marg_y.grid('on')
# labels appear outside of plot area, so auto-adjust
plt.tight_layout()
plt.show()
设置文字大小
版权声明:本文为weixin_38987362原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。