cellfish.plot.CircleLabels#
- class cellfish.plot.CircleLabels(labels, split_groups=None, palette=None, dot_size=100, fontsize=12, text_color='black', spacing=2, **kwargs)#
Draw colored dots with text labels beside them (Marsilea RenderPlan).
Attributes table#
If the RenderPlan has Deformation |
|
Draw on top and bottom |
|
Draw on left and right |
|
For the RenderPlan to self-aware of whether its render canvas will be split. |
|
Methods table#
|
|
|
If the size is unknown before rendering, this function must be implemented to return the canvas size in inches. |
|
|
This should define the legend return by the RenderPlan. |
|
|
|
|
|
|
This function will be call when render a plot |
|
The major rendering function Define how the plot is drawn |
|
|
|
|
|
|
|
|
|
|
|
|
|
Update the options passed to the legend built by |
|
|
|
|
|
|
|
|
Attributes#
- CircleLabels.deform: Deformation = None#
- CircleLabels.has_deform#
If the RenderPlan has Deformation
- CircleLabels.is_body#
Draw on top and bottom
- CircleLabels.is_flank#
Draw on left and right
- CircleLabels.is_split#
For the RenderPlan to self-aware of whether its render canvas will be split. Useful to determine how to get render data.
- CircleLabels.render_main = False#
Methods#
- CircleLabels.data_validator(data, target='2d')#
- CircleLabels.get_canvas_size(figure, main_height=None, main_width=None, **kwargs)#
If the size is unknown before rendering, this function must be implemented to return the canvas size in inches.
- Return type:
- CircleLabels.get_data()#
- CircleLabels.get_deform_func()#
- CircleLabels.get_group_data()#
- CircleLabels.get_group_params()#
- CircleLabels.get_legends()#
This should define the legend return by the RenderPlan.
The return object could be any
matplotlib.artist.ArtistNote
matplotlib.colorbar.Colorbaris not anArtist. Uselegendkit.colorart
- CircleLabels.get_params()#
- CircleLabels.get_render_spec(axes)#
- CircleLabels.get_split_regroup()#
- CircleLabels.reindex_by_chunk(group_data)#
- CircleLabels.render(ax)#
This function will be call when render a plot
If the canvas is split,
render_axes()will be called.If only one ax is passed,
render_ax()will be called.
if self.is_split: self.render_axes(axes) else: self.render_ax(axes, self.get_render_data())
- CircleLabels.render_ax(spec)#
The major rendering function Define how the plot is drawn
- Parameters:
spec (RenderSpec)
- CircleLabels.set(**kwargs)#
- CircleLabels.set_data(*data)#
- CircleLabels.set_deform(deform)#
- Parameters:
deform (Deformation)
- CircleLabels.set_group_data(group_data)#
- CircleLabels.set_label(label, loc=None, props=None)#
- CircleLabels.set_legends(**kwargs)#
Update the options passed to the legend built by
get_legends().Only available on RenderPlan that draws a legend from
_legend_kws.
- CircleLabels.set_side(side)#
- CircleLabels.set_size(size)#
- CircleLabels.set_split_regroup(ratio)#
- CircleLabels.update_main_canvas_size()#