对比了matplotlib.pyplot和seaborn的代码和结果,记录一下。
aaa是绘图数据。
import matplotlib.pyplot as plt
bins = np.linspace(min(aaa),max(aaa),20)
plt.hist(aaa,bins)
plt.xlabel('max entropy')
plt.ylabel('density')
plt.savefig(r'C:\Users\sc35131\Desktop\wangyao\Cell_consistence_alogrithm\picture9\\'+'124',bbox_inches = 'tight',pad_inches = 0,dpi =350)
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style='darkgrid')
sns.distplot(aaa,color='red')
plt.xlabel('max entropy')
plt.savefig(r'C:\Users\sc35131\Desktop\wangyao\Cell_consistence_alogrithm\picture9\\'+'14',bbox_inches = 'tight',pad_inches = 0,dpi =350)