Description
plotly is a set of Open Source Graphing Libraries for building "I_nteractive charts and maps for Python, R, Julia, ggplot2, .NET, and MATLAB®_".
The "high level" concept is very similar to vega-lite (the current DVC plots backend): Both are javascript libraries based on d3.js
using JSON to describe the plot "schema" and provide "bindings" to generate plots in different languages (altair would be the vega-lite Python equivalent). See a more detailed comparison
It would be nice to extend DVC plots to support plotly
as an alternative backend. The following is a non-exhaustive list of what I consider advantages (in DVC context) of adding support to plotly
:
- Wider adoption
As a non exhaustive example, see differences between python bindings stats plotly / altair
- Better default interactivity
Try plotly line chart / vega-lite line chart
This is especially relevant for some complex plots like iterative/dvc#4455 , where plotly
provides many relevant interactions by default (i.e. reordering columns, selecting subsets) that seem quite complicated to add (if even possible) in vega-lite
:
plotly parallel coordinates / vega-lite parallel coordinates
- It seems fairly easy to implement 👼
After reviewing the internal dvc.render
module and discussing it with @pared , it looks that it won't require too many changes on DVC to add support to plotly
.
Edit by @dberenbaum to start a tasklist here of possible future plotly enhancements:
- [ ] Better smoothing (https://github.com/iterative/dvc-render/issues/135)
- [ ] Log-linear plots (https://github.com/iterative/dvc-render/pull/136)
- [ ] Zooming and panning (https://github.com/iterative/vscode-dvc/issues/4530)
- [ ] Responsive sizing (https://github.com/iterative/vscode-dvc/issues/3757)
- [ ] Better / TB-like tooltips https://github.com/iterative/vscode-dvc/issues/4532