Python altair.vconcat() Examples

The following are 2 code examples of altair.vconcat(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module altair , or try the search function .
Example #1
Source File: attribute.py    From errudite with GNU General Public License v2.0 6 votes vote down vote up
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") 
Example #2
Source File: rewrite.py    From errudite with GNU General Public License v2.0 6 votes vote down vote up
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")