본문 바로가기
Python

[python][matplotlib] 에러바 그리기matplotlib.pyplot.errorbar

by Chandler.j 2020. 12. 30.
반응형

fig1. title


#0. 소스데이터

fig2. source data

 

#1. 에러바 그리기

#plot errorbar

plt.rcParams['figure.figsize']=(15,7)
plt.errorbar(x=y_train_gb.index, y=y_train_gb['pred-true_mean'], yerr=y_train_gb['pred-true_std'])
plt.title('mean error(pred_eGFR - true_eGFR) in trainset')
plt.xlabel('round_eGFR')
plt.ylabel('mean error')
plt.show()

fig2. output of #1


TOP

Designed by 티스토리