emperor.Emperor.shape_by¶
-
Emperor.shape_by(category, shapes=None)¶ Set the shape settings for the plot elements
Parameters: category: str
Name of the metadata column.
shapes: dict or pd.Series, optional
Mapping of categories to string values determining the shape of the objects. See the notes for the valid options.
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
shapesdescribes fewer or more categories than the ones present in thecategorycolumn. Ifshapeshas shapes 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.visibility_by,emperor.core.Emperor.set_background_color,emperor.core.Emperor.set_axesNotes
The valid shape names are
"Sphere","Cube","Cone","Icosahedron"and"Cylinder".