Allow multiple plots from one plot file
See original GitHub issueConsider 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:
- Created 2 years ago
- Reactions:5
- Comments:14 (14 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

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_LABELand we could encourage this format as a quick workaround for combiningyvalues. On the DVCLive side, we could add some logic to facilitate the optional usage of this format (i.e. adding a newstagecolumn for grouping based on themetricname).@dberenbaum should we/can we prioritize this?