altair.RadialGradient#
- class altair.RadialGradient(gradient=Undefined, stops=Undefined, id=Undefined, r1=Undefined, r2=Undefined, x1=Undefined, x2=Undefined, y1=Undefined, y2=Undefined, **kwds)#
径向渐变(RadialGradient)模式包装器。
- 参数:
- gradientLiteral[‘radial’]
渐变类型。径向渐变使用
"radial"
。- stopsSequence[dict,
GradientStop
] 定义渐变颜色序列的渐变停止点数组。
- idstr
- r1float
渐变的内圆半径长度,以标准化 [0, 1] 坐标表示。
默认值:
0
- r2float
渐变的外圆半径长度,以标准化 [0, 1] 坐标表示。
默认值:
0.5
- x1float
渐变内圆中心的 x 坐标,以标准化 [0, 1] 坐标表示。
默认值:
0.5
- x2float
渐变外圆中心的 x 坐标,以标准化 [0, 1] 坐标表示。
默认值:
0.5
- y1float
渐变内圆中心的 y 坐标,以标准化 [0, 1] 坐标表示。
默认值:
0.5
- y2float
渐变外圆中心的 y 坐标,以标准化 [0, 1] 坐标表示。
默认值:
0.5
- __init__(gradient=Undefined, stops=Undefined, id=Undefined, r1=Undefined, r2=Undefined, x1=Undefined, x2=Undefined, y1=Undefined, y2=Undefined, **kwds)#
方法
__init__
([gradient, stops, id, r1, r2, x1, ...])copy
([deep, ignore])返回对象的副本。
from_dict
(dct[, validate])从字典表示构建类实例。
from_json
(json_string[, validate])从有效的 JSON 字符串实例化对象。
resolve_references
([schema])在此对象的模式或根模式的上下文中解析引用。
to_dict
([validate, ignore, context])返回对象的字典表示。
to_json
([validate, indent, sort_keys, ...])将此对象的 JSON 表示作为字符串发出。
validate
(instance[, schema])在根模式的上下文中针对类模式验证实例。
validate_property
(name, value[, schema])在根模式的上下文中针对属性模式验证属性。