我不知道如何增加 Altair 中图表标题的字体大小。我的代码只会更改轴标题的字体大小,但不会更改图表标题。
这是我测试出来的:
data = df
bars = alt.Chart(data, title="This is the Chart Title").mark_bar().encode(
x = 'Feature1',
y = 'Feature2',
color = alt.Color('Feature1', legend=None)).configure_axis(
labelFontSize=16,
titleFontSize=16
)
bars
在本例中,titleFontSize
参数更改了轴标题的字体('Feature1'
在'Feature2'
本例中)。有没有简单的方法来增加图表标题的字体?