本文整理汇总了Python中altair.vconcat方法的典型用法代码示例。如果您正苦于以下问题:Python altair.vconcat方法的具体用法?Python altair.vconcat怎么用?Python altair.vconcat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类altair
的用法示例。
在下文中一共展示了altair.vconcat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: visualize_models
# 需要导入模块: import altair [as 别名]
# 或者: from altair import vconcat [as 别名]
def visualize_models(self,
models: List[str],
instance_hash: Dict[InstanceKey, Instance]={},
instance_hash_rewritten: Dict[InstanceKey, Instance]={},
filtered_instances: List[InstanceKey]=None,
normalize: bool=False):
"""
Visualize the attribute distribution for ALL the ``models``.
This function calls ``self.visualize_per_model`` and concate the
charts returned for each model.
"""
instance_hash = instance_hash or Instance.instance_hash
instance_hash_rewritten = instance_hash_rewritten or Instance.instance_hash_rewritten
charts = [ self.visualize_per_model(
instance_hash=instance_hash,
instance_hash_rewritten=instance_hash_rewritten,
model=model,
filtered_instances=filtered_instances,
normalize=normalize
) for model in models ]
return alt.vconcat(*charts).resolve_scale(x="shared", y="shared", color="shared")
示例2: visualize_delta_confidence_models
# 需要导入模块: import altair [as 别名]
# 或者: from altair import vconcat [as 别名]
def visualize_delta_confidence_models(self,
instance_hash: Dict[InstanceKey, Instance]={},
instance_hash_rewritten: Dict[InstanceKey, Instance]={},
filtered_instances: List[InstanceKey]=None,
models: str=[]):
"""
Visualize the delta confidence distribution for ALL the ``models``.
This function calls ``self.visualize_delta_confidence_per_model`` and concate the
charts returned for each model.
"""
model = models or [ Instance.model ]
if not models:
models = [ Instance.resolve_default_model(None) ]
output = []
charts = [ self.visualize_delta_confidence_per_model(
instance_hash=instance_hash,
instance_hash_rewritten=instance_hash_rewritten,
model=model,
filtered_instances=filtered_instances,
) for model in models ]
return alt.vconcat(*charts).resolve_scale(x="shared", y="shared", color="shared")