Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plots: Add "group by" templates #9

Open
daavoo opened this issue Sep 30, 2021 · 6 comments
Open

plots: Add "group by" templates #9

daavoo opened this issue Sep 30, 2021 · 6 comments
Labels

Comments

@daavoo
Copy link
Contributor

daavoo commented Sep 30, 2021

However, I think that the user in iterative/studio-support#23 (comment) showcases a new scenario that we haven't discussed so far in #5980 (reply in thread) . 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.

I think this could even be a separate issue to add grouping by a categorical column. We could add a template like linear_categories and add the DVC_METRIC_COLOR_LABEL. We could also add a similar template for the scatter plot (and maybe others like bar plots in the future).

Originally posted by @dberenbaum in iterative/dvc#6316 (comment)

@pared
Copy link
Contributor

pared commented Sep 30, 2021

The question here is whether we need a separate template for that. It might be possible that proper implementation of #5980 can handle such a use case. Need to research whether it would be possible to add more advanced grouping that would be capable of utilizing few data fields. For example, group by revision and filename.

@dberenbaum
Copy link
Contributor

dberenbaum commented Sep 30, 2021

So if there is some grouping, the plot would color by that group and diff would show a facet grid, otherwise diff would color by rev? We also need to consider if this can somehow be generalized for all templates except the confusion matrix ones.

Never mind, I think I misunderstood. Are you saying that instead of relying on vega facet grids, the html layout can handle organizing diffs? How would we decide whether diffs should be handled within the plot or by the html layout?

@pared
Copy link
Contributor

pared commented Oct 6, 2021

@dberenbaum
In case of vega this would be handled by template (like we do with confusion matrix)
In case of images, it has to be done with HTML.

@dberenbaum
Copy link
Contributor

In that case, I think my strikethrough question is the relevant one 😄

@pared
Copy link
Contributor

pared commented Oct 28, 2021

@dberenbaum sorry for late response,
Currently this problem (facet vs colors) is resolve on template-level, so for example:

  • if its linear plot, the template is set up to group by rev field
  • if its confusion_matrix, template knows to create new facet for each rev value

@dberenbaum
Copy link
Contributor

Thanks @pared. I was asking how you think this should be handled if we implement this feature via #5980 or some other idea you have.

@daavoo daavoo transferred this issue from iterative/dvc Mar 4, 2022
@daavoo daavoo added A: vega Area: Vega plots and removed A: plots labels Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants