Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!
In [1]:
!curl -sSL -o loss.csv https://github.com/dclong/blog/files/7229259/loss.csv
In [5]:
import pandas as pd
import hvplot.pandas
In [4]:
df = pd.read_csv("loss.csv")
df
Out[4]:
Manually Overlay Multiple Plots¶
This way is good for creating subplots but is not suggested for overlaying multiple plots into one plot as you will have to do extra work to label lines.
In [8]:
df.hvplot.line("Step", "Value_train") + df.hvplot.line("Step", "Value_train")
Out[8]:
In [9]:
df.hvplot.line("Step", "Value_train") * df.hvplot.line("Step", "Value_train")
Out[9]:
groupby
+ overlay
¶
This approach is best for slim-and-tall data.
In [14]:
df2 = df.melt(id_vars="Step", value_vars=["Value_train", "Value_test"])
df2
Out[14]:
In [16]:
df2.hvplot.line("Step", "value", groupby="variable")
Out[16]:
In [18]:
df2.hvplot.line("Step", "value", groupby="variable").overlay()
Out[18]:
Direct Specify Multiple y-Columns¶
In [19]:
df.hvplot.line("Step", ("Value_train", "Value_test"))
Out[19]:
In [ ]: