Bus errorとSegmentation faultに困ったら見るブログ

物理の研究者による日々の研究生活のメモ書きです ( python/emacs/html/Japascript/シェルスクリプト/TeX/Mac/C言語/Linux/git/tmux/R/ポケモンGO)

【python3, matplotlib】エラーバー付きのプロット

■ 参考 : matplotlib エラーバー付きのグラフを描く

errorbarという関数を使う
xとyにデータを入れて、yerrに縦軸方向のエラーの値を入れる
y_minが下側のエラー、y_maxが上側のエラー

from matplotlib import pyplot as plt
plt.figure(figsize=(10,7))
plt.errorbar(x, y, yerr = [y_min, y_max], capsize=5, fmt='o', markersize=10, ecolor='black', markeredgecolor = "black", color='w')


関係ありそうな記事を追記

■ 参考 :matplotlibで信頼区間(エラーバー)を描画

■ 参考 : Matplotlibで日付データをplot(グラフ)表示

ランキング参加中です

↓クリックしていただけると嬉しいです〜