Wasn’t sure where to best share this. Let me know if there are more appropriate channels.
If you use the fish shell and the kitty terminal (not sure if other terminals can print images) you can print DVC plots directly in the terminal without opening an external program/browser. The function also prints the metrics diff below the plot, but I didn’t have any changes to show now
Save this code as ~/.config/fish/functions/plotit.fish
(follow the link for the latest version)
You also need jq
and vega-cli
installed.
Example usage:
-
plotit pr_curve.csv
-> prints diff plot with width x height of 500px x 500px andx
set to row-index andy
to the second column of the csv -
plotit pr_curve.csv recall precision
-> same as above but selects the columns forx
andy
-
plotit pr_curve.csv recall precision 800 800
-> with custom width and height in pixels
@dmitry are there plans to add something like this to the dvc plots
command? e.g. dvc plots --print-to-term