PointsStyle#

class movement.napari.layer_styles.PointsStyle(name, visible=True, blending='translucent', symbol='disc', size=10, border_width=0, face_color=None, face_color_cycle=None, face_colormap='turbo', text=<factory>)[source]#

Bases: LayerStyle

Style properties for a napari Points layer.

Methods

as_kwargs()

Return the style properties as a dictionary of kwargs.

set_color_by(property, properties_df[, cmap])

Color markers and text by a column in the properties DataFrame.

set_text_by(property)

Set the text property for the points layer.

as_kwargs()#

Return the style properties as a dictionary of kwargs.

Return type:

dict

set_color_by(property, properties_df, cmap=None)[source]#

Color markers and text by a column in the properties DataFrame.

Parameters:
  • property (str) – The column name in the properties DataFrame to color by.

  • properties_df (pd.DataFrame) – The properties DataFrame containing the data to color by. It should contain the column specified in property.

  • cmap (str, optional) – The name of the colormap to use, otherwise use the face_colormap.

Return type:

None

set_text_by(property)[source]#

Set the text property for the points layer.

Parameters:

property (str) – The column name in the properties DataFrame to use for text.

Return type:

None