BoxesStyle#
- class movement.napari.layer_styles.BoxesStyle(name, visible=True, blending='translucent', edge_width=3, opacity=1.0, shape_type='rectangle', face_color='#FFFFFF00', edge_colormap='turbo', text=<factory>)[source]#
Bases:
LayerStyle
Style properties for a napari Shapes layer.
Methods
Return the style properties as a dictionary of kwargs.
set_color_by
(property, properties_df[, cmap])Color boxes and text by chosen column in the properties DataFrame.
set_text_by
(property)Set the text property for the boxes layer.
- set_color_by(property, properties_df, cmap=None)[source]#
Color boxes and text by chosen column in the properties DataFrame.
- Parameters:
- Return type:
Notes
The input property is expected to be a column in the properties dataframe and it is used to define the color of the text. A factorized version of the property (“<property>_factorized”) is used to define the edges color, and is also expected to be present in the properties dataframe.