一种方法是将域显式设置为对称:
import numpy as np
import pandas as pd
import altair as alt
df = pd.DataFrame(np.random.randn(100, 3), columns=['x', 'y', 'z'])
alt.Chart(df).mark_point().encode(
x='x',
y='y',
color=alt.Color('z', scale=alt.Scale(scheme='blueorange', domain=[-3, 3]))
)