# Multiple data series plot

**URL:** <https://discuss.dvc.org/t/multiple-data-series-plot/1344>\
**Category:** Questions\
**Created:** [September 15, 2022, 1:30pm UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344 "2022-09-15T13:30:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dano](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dano](https://discuss.dvc.org/u/Dano)\
**Post date:** [September 15, 2022, 1:30pm UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/1 "2022-09-15T13:30:55Z")

</div>

Hey,  
I’m trying to plot multiple lines in the same plot using example showed here:

> **[plots show](https://dvc.org/doc/command-reference/plots/show)**
>
> Open-source version control system for Data Science and Machine Learning projects. Git-like experience to organize your data, models, and experiments.

```auto
plots:
  - test_vs_train_loss:
      x: epoch
      y:
        training_data.csv: [test_loss, train_loss]
      title: Compare loss training versus test

```

expected str, in stages → train\_model → plots → 0 → test\_vs\_train\_loss → y, line 56, column 13  
55 │ │ y:  
56 │ │ │ training\_data.csv: [test\_loss, train\_loss]

The example doesn’t seem to work. Array object seems not be supported? What am I missing?

---

<div class="post-metadata">

**Author:** ![Paffciu](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@Paffciu](https://discuss.dvc.org/u/Paffciu)\
**Post date:** [September 15, 2022, 1:36pm UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/2 "2022-09-15T13:36:29Z")

</div>

Hey @Dano!  
What is your `dvc version`?

---

<div class="post-metadata">

**Author:** ![skshetry](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@skshetry](https://discuss.dvc.org/u/skshetry)\
**Post date:** [September 15, 2022, 3:59pm UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/3 "2022-09-15T15:59:38Z")

</div>

I think `plots` should be a dictionary:

```auto
plots:
  test_vs_train_loss:
    x: epoch
    y:
      training_data.csv: [test_loss, train_loss]
    title: Compare loss training versus test

```

---

<div class="post-metadata">

**Author:** ![Dano](https://avatars.discourse-cdn.com/v4/letter/d/e0b2c6/32.png) [@Dano](https://discuss.dvc.org/u/Dano)\
**Post date:** [September 18, 2022, 12:05pm UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/4 "2022-09-18T12:05:14Z")

</div>

Im using 2.17.0  
I also tried the dictionary version but I get ‘expected list’ error

---

<div class="post-metadata">

**Author:** ![Paffciu](https://avatars.discourse-cdn.com/v4/letter/p/d07c76/32.png) [@Paffciu](https://discuss.dvc.org/u/Paffciu)\
**Post date:** [September 19, 2022, 10:58am UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/5 "2022-09-19T10:58:09Z")

</div>

@Dano

could you try running this script?

```auto
#!/bin/bash

set -exu
pushd $TMPDIR

wsp=test_wspace
rep=test_repo

rm -rf $wsp && mkdir $wsp && pushd $wsp
main=$(pwd)

mkdir $rep && pushd $rep

git init
dvc init

echo -e "epoch,test_loss,train_loss
0,1,5
1,2,6
2,3,7" > data

dvc add data
dvc run -d data -o training_data.csv -n train cp data training_data.csv

echo -e "plots:
  test_vs_train_loss:
    x: epoch
    y:
      training_data.csv: [test_loss, train_loss]
    title: Compare loss training versus test
" >> dvc.yaml

dvc plots show --open

```

It will work on Unix system.

---

<div class="post-metadata">

**Author:** ![Tom\_K](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Tom\_K](https://discuss.dvc.org/u/Tom_K)\
**Post date:** [May 26, 2023, 12:48am UTC](https://discuss.dvc.org/t/multiple-data-series-plot/1344/6 "2023-05-26T00:48:33Z")

</div>

Aside from the @Paffciu script was this solved? I am encountering the same issue.
