neulab / compare-mt

A tool for holistic analysis of language generations systems
BSD 3-Clause "New" or "Revised" License
465 stars 58 forks source link

Fix bar chart color cycling #134

Closed Proyag closed 2 years ago

Proyag commented 2 years ago

Indexing into a hardcoded list of colors for bar charts causes an IndexError when the number of systems being compared is greater than the number of colors in bar_colors. https://github.com/neulab/compare-mt/blob/a0482d7a3ddac64ef51c3c92a0c86919c63f670b/compare_mt/reporters.py#L81-L92

I think the right way to handle this is to use matplotlib's rcParams to customize the color cycle instead.

This does result in duplicate colors in the legend when there are >8 systems, but that's probably better than crashing.

neubig commented 2 years ago

Awesome, thanks!