iterative / dvc-render

Library for rendering DVC plots
http://docs.iterative.ai/dvc-render/
Apache License 2.0
6 stars 5 forks source link

center-align confusion matrix title #160

Closed sisp closed 6 months ago

sisp commented 6 months ago

I've fixed the alignment of the confusion matrix title to be centered. Before, it was left-aligned which wasn't consistent with other plots – and IMO doesn't look nice.

Before After
before after
dberenbaum commented 6 months ago

Thanks @sisp! What do you think of adding the same to all the plots so we ensure it stays consistent regardless of vega-lite updates?

sisp commented 6 months ago

@dberenbaum We could probably do that. Do you happen to have a demo of all Vega templates to check that "anchor": "middle" renders correctly for all of them?

dberenbaum commented 6 months ago

I think the closest we have is https://github.com/iterative/vscode-dvc-demo/blob/main/dvc.yaml. It should be easy to adjust the templates there to check the others (for example, bar_horizontal -> bar_horizontal_sorted).

sisp commented 6 months ago

I've added the anchor: middle setting to all Vega-Lite plot titles. The demo plots except confusion matrix are unchanged. See the attached reports before and after the change: