趣味で計算流砂水理

趣味で計算流砂水理 Computational Sediment Hydraulics for Fun Learning

数値計算とか河川工学とかプログラミングのことを書いています

MENU

備忘録:hvplotでlegendのtitleを変える

スポンサーリンク

いつもわからなくなるのでメモです。


hvplotでpandas Dataframeからグラフを書くと

df.hvplot()

f:id:SedimentHydraulics:20211204114448p:plain

こんな感じに凡例のタイトルがVariableとなるのが標準です。 変更する場合は、group_labelでオプションで設定します。

df.hvplot(group_label='title')

f:id:SedimentHydraulics:20211204114709p:plain

参考サイト

Changing the legend title · Issue #430 · holoviz/hvplot · GitHub

関連記事

computational-sediment-hyd.hatenablog.jp