# Plotting problems

**URL:** <https://discuss.dvc.org/t/plotting-problems/2044>\
**Category:** Questions\
**Created:** [April 17, 2024, 1:32pm UTC](https://discuss.dvc.org/t/plotting-problems/2044 "2024-04-17T13:32:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aliaga](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aliaga](https://discuss.dvc.org/u/Aliaga)\
**Post date:** [April 17, 2024, 1:32pm UTC](https://discuss.dvc.org/t/plotting-problems/2044/1 "2024-04-17T13:32:53Z")

</div>

I am following the tutorial at [Get Started: Metrics, Plots, and Parameters](https://dvc.org/doc/start/data-pipelines/metrics-parameters-plots#viewing-metrics-and-plots).

So far everything went well but when plotting with dvc plots show I got

```auto
dvc plots show
DVC failed to load some plots for following revisions: 'workspace'.                                                                                        
file:///home/user/2024/DVC/example-get_started/dvc_plots/index.html

```

Also , in the repo I can see only one plot (`eval/plots/images/importance.png`) but curiosly that plot does not appear in dvc\_lots/index.html

So my questions are

1. What is this error and why does it happen?
2. Why the only plot I can see, does not appear on the html page
3. The other plots that do appear on the html page, where are they?

oh and by the way, why does the tutorial say to do `git add eval` when eval in in the .gitignore?

EDIT: I dont know if it is related but when I run dvc repro I get among other output

```auto
Running stage 'evaluate':                                                                                                                                  
> python src/evaluate.py model.pkl data/features
WARNING:dvclive:Some DVCLive features are unsupported in `dvc repro`.
To use DVCLive with a DVC Pipeline, run it with `dvc exp run`.
Updating lock file 'dvc.lock'                                  

```

---

<div class="post-metadata">

**Author:** ![dberenbaum](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dberenbaum](https://discuss.dvc.org/u/dberenbaum)\
**Post date:** [April 17, 2024, 6:59pm UTC](https://discuss.dvc.org/t/plotting-problems/2044/2 "2024-04-17T18:59:18Z")

</div>

Could you try to follow this link?

> **[Get Started: Metrics, Plots, and Parameters](https://dvc.org/doc/start/data-pipelines/metrics-parameters-plots#expand-to-see-how-to-customize-metrics-and-plots)**
>
> Get started with DVC metrics, plots, and parameters. Learn how to capture, evaluate, and visualize ML projects without leaving Git.

Paste that `dvc.yaml` contents from there into your `dvc.yaml` file and then see if `dvc plots show` works as expected.

---

<div class="post-metadata">

**Author:** ![Aliaga](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aliaga](https://discuss.dvc.org/u/Aliaga)\
**Post date:** [April 18, 2024, 6:01am UTC](https://discuss.dvc.org/t/plotting-problems/2044/3 "2024-04-18T06:01:06Z")

</div>

those are the contents I am using in the first place. I put them after the original dvc.yaml

---

<div class="post-metadata">

**Author:** ![dberenbaum](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dberenbaum](https://discuss.dvc.org/u/dberenbaum)\
**Post date:** [April 18, 2024, 11:56am UTC](https://discuss.dvc.org/t/plotting-problems/2044/4 "2024-04-18T11:56:43Z")

</div>

Would you mind sharing your `dvc.yaml` as well as what files you have under the `eval` folder?

---

<div class="post-metadata">

**Author:** ![Aliaga](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aliaga](https://discuss.dvc.org/u/Aliaga)\
**Post date:** [April 19, 2024, 9:40am UTC](https://discuss.dvc.org/t/plotting-problems/2044/5 "2024-04-19T09:40:11Z")

</div>

dvc.yaml

```auto
stages:
  prepare:
    cmd: python src/prepare.py data/data.xml
    deps:
    - data/data.xml
    - src/prepare.py
    params:
    - prepare.seed
    - prepare.split
    outs:
    - data/prepared
  featurize:
    cmd: python src/featurization.py data/prepared data/features
    deps:
    - data/prepared
    - src/featurization.py
    params:
    - featurize.max_features
    - featurize.ngrams
    outs:
    - data/features
  train:
    cmd: python src/train.py data/features model.pkl
    deps:
    - data/features
    - src/train.py
    params:
    - train.min_split
    - train.n_est
    - train.seed
    outs:
    - model.pkl
  evaluate:
    cmd: python src/evaluate.py model.pkl data/features
    deps:
    - data/features
    - model.pkl
    - src/evaluate.py
    outs:
    - eval
metrics:
  - eval/metrics.json
plots:
  - ROC:
      template: simple
      x: fpr
      y:
        eval/plots/sklearn/roc/train.json: tpr
        eval/plots/sklearn/roc/test.json: tpr
  - Confusion-Matrix:
      template: confusion
      x: actual
      y:
        eval/plots/sklearn/cm/train.json: predicted
        eval/plots/sklearn/cm/test.json: predicted
  - Precision-Recall:
      template: simple
      x: recall
      y:
        eval/prc/train.json: precision
        eval/prc/test.json: precision
  - eval/importance.png

```

---

<div class="post-metadata">

**Author:** ![Aliaga](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@Aliaga](https://discuss.dvc.org/u/Aliaga)\
**Post date:** [April 19, 2024, 9:41am UTC](https://discuss.dvc.org/t/plotting-problems/2044/6 "2024-04-19T09:41:26Z")

</div>

under the eval folder

```auto
.
├── metrics.json
└── plots
    ├── images
    │ └── importance.png
    └── sklearn
        ├── cm
        │ ├── test.json
        │ └── train.json
        ├── prc
        │ ├── test.json
        │ └── train.json
        └── roc
            ├── test.json
            └── train.json

6 directories, 8 files

```

---

<div class="post-metadata">

**Author:** ![dberenbaum](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@dberenbaum](https://discuss.dvc.org/u/dberenbaum)\
**Post date:** [April 19, 2024, 12:58pm UTC](https://discuss.dvc.org/t/plotting-problems/2044/8 "2024-04-19T12:58:28Z")

</div>

Sorry, it looks like the indentation is wrong in the docs, which is causing the problem. We will get that fixed. You can copy the plots with the correct indentation from [example-get-started/dvc.yaml at main · iterative/example-get-started · GitHub](https://github.com/iterative/example-get-started/blob/main/dvc.yaml).
