【问题标题】:How to make Horizontal Bar in pygal with labels on y?如何在pygal中制作带有y标签的单杠? 【发布时间】:2016-01-15 09:50:10 【问题描述】: 类似于this,但没有图例并且在 y 上带有标签。 【问题讨论】: 标签: pygal 【解决方案1】: 这是我用来用 pygal 制作单杠的: bar_chart = pygal.HorizontalBar(show_legend=False) bar_chart.title = "Title" bar_chart.add("", [1, 4, 6, 7, 2, 3]) bar_chart.x_labels = ("the", "quick", "brown", "fox", "jumps", "over") 它生成了这样的图表: 【讨论】: 我怎样才能使每个标签的颜色不同,而不是如图所示? 你试过pygal.org/en/stable/documentation/configuration/… 吗?