[matplotlib] 에러 시각화, errorbar

황종수·2020년 12월 22일
0

matplotlib

목록 보기
2/7

출처:https://jakevdp.github.io/PythonDataScienceHandbook/04.03-errorbars.html

basic errorbars

  • 기본형
%matplotlib inline
import matplotlib.pyplot as plt
plt.style.use('seaborn-whitegrid')
import numpy as np
x = np.linspace(0, 10, 50)
dy = 0.8
y = np.sin(x) + dy * np.random.randn(50)

plt.errorbar(x, y, yerr=dy, fmt='.k');

  • 일부 옵션 설정
plt.errorbar(x, y, yerr=dy, fmt='o', color='black',
             ecolor='lightgray', elinewidth=3, capsize=0);

profile
호앙조옹스우

0개의 댓글