question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow multiple plots from one plot file

See original GitHub issue

Consider a mock dvc.yaml such as:

stages:
    A:
        cmd: ...
        plots:
            - metrics.csv:
                x: x
                y: y1
            - metrics.csv:
                x: x
                y: y2

When using dvc plots show, DVC will only show one (the last) plot. The fix is to split the one metrics file into multiple metrics files with the same x but different y variables. This feels pretty inconvenient for metrics that are related in their independent variable, and so can be stored in the same table and file.

On the surface I don’t see any reason why a specified plot artifact can only be used for one plot.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

2reactions
daavoocommented, Sep 29, 2021

By “combining” we have been usually referring to get multiple (y) columns from either the same file or multiple files, which seems reasonable given how we usually recommend formatting the data in linear plots.

However, I think that the user in https://github.com/iterative/studio-support/issues/23#issuecomment-929932069 showcases a new scenario that we haven’t discussed so far in https://github.com/iterative/dvc/discussions/5980#discussioncomment-1026072 . It is basically using the values of a third column (z) to group the values of a single column (y) and the template looks very clean.

IMO this use case could be easily covered on the DVC side by extending the vega template and adding a new placeholder DVC_METRIC_COLOR_LABEL and we could encourage this format as a quick workaround for combining y values. On the DVCLive side, we could add some logic to facilitate the optional usage of this format (i.e. adding a new stage column for grouping based on the metric name).

2reactions
shchekleincommented, Sep 28, 2021

@dberenbaum should we/can we prioritize this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plot multiple plots in Matplotlib - GeeksforGeeks
In Matplotlib, we can draw multiple graphs in a single plot in two ways. One is by using subplot() function and other by...
Read more >
Combine Multiple Plots - MATLAB & Simulink - MathWorks
Show multiple plots together in the same figure, either by combining the plots in the same axes or by creating a tiled chart...
Read more >
How can I plot different plots out of multiple data files with only ...
I've thought of just putting a loop for, and changing the filename, but I'm not sure how to do this effectively. import matplotlib...
Read more >
Multiple plots in one page - AWS
From the Cookbook for R/), multiplot function is costumer designed function. You can copy the codes, and it can work like gridExtra ....
Read more >
8.5 Multiple Plot Display | Analytics Using R
One potential helpful parameter setting is the ability to insert multiple plots in one window. The mfrow parameter changes the print setting to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found