emperor.Emperor.visibility_by¶
-
Emperor.visibility_by(category, visibilities=None, negate=False)¶ Set the visibility settings for the plot elements
Parameters: category: str
Name of the metadata column.
visibilities: dict, list or pd.Series, optional
When this argument is a
dictorpd.Series, it is a mapping of categories to a boolean values determining whether or not that category should be visible. When this argument is alist, only categories present will be visible in the plot.negate: bool
Whether or not to negate the values in
visibilities.Returns: emperor.Emperor
Emperor object with updated settings.
Raises: KeyError
If
categoryis not part of the metadata.TypeError
If
categoryis not a string.ValueError
If
visibilitiesdescribes fewer or more categories than the ones present in thecategorycolumn. Ifvisibilitieshas visibilities in a non-string format.See also
emperor.core.Emperor.color_by,emperor.core.Emperor.scale_by,emperor.core.Emperor.opacity_by,emperor.core.Emperor.shape_by,emperor.core.Emperor.set_background_color,emperor.core.Emperor.set_axes