• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

seaborn lineplot

date: 2024-07-07 excerpt: seaborn

tag: seabornpythonmatplotlib可視化


seaborn lineplot

lineplotを描画する

ax = sns.lineplot(x="{PANDAS_COL_NAME0}", y="{PANDAS_COL_NAME1}")
  • label引数で、凡例(legend)を追加できる

複数のlineplotを描画し、信頼区間も描画する

plt.figure(figsize=(20, 10))
plt.xticks(rotation=90)
ax = sns.lineplot(data=df, x="round_time", y="throughput", hue="proto", errorbar=('ci', 90))
ax
  • hue - おのおのの描画をグルーピングするキーワード
  • errorbar=(ci, 90) - 信頼区間90%を描画する
    • ciはconfidence intervalの略
    • 信頼区間を描画する場合はxの値が複数ある必要がある


seabornpythonmatplotlib可視化 Share Tweet