您可以使用轴中所需符号的希腊语 Unicode在轴中显示希腊字母。
工作示例:
import altair as alt
from vega_datasets import data
unicode_gamma = '\u03b3'
# for the notebook only (not for JupyterLab) run this command once per session
alt.renderers.enable('notebook')
iris = data.iris()
alt.Chart(iris).mark_point().encode(
x=alt.X('petalLength', axis=alt.Axis(title=' Alpha Beta Gamma \u03b1 \u03b2 '+ unicode_gamma)),
y='petalWidth',
color='species'
)
Run Code Online (Sandbox Code Playgroud)