How do I plot multiple lines on a plot with a legend?
Support:
less than a minute
Create a multi-line custom chart with wandb.plot.line_series()
. Navigate to the project page to view the line chart. To add a legend, include the keys
argument in wandb.plot.line_series()
. For example:
wandb.log(
{
"my_plot": wandb.plot.line_series(
xs=x_data, ys=y_data, keys=["metric_A", "metric_B"]
)
}
)
Refer to additional details about multi-line plots here under the Multi-line tab.
Feedback
Was this page helpful?
Glad to hear it! If you have further feedback, please let us know.
Sorry to hear that. Please tell us how we can improve.