cytoflow.views package#

cytoflow.views#

This package contains all cytoflow views – classes implementing IView whose plot() function plots an experiment.

cytoflow.views.add_legend(self, legend_data=None, title=None, label_order=None, adjust_subtitles=False, **kwargs)[source]#

Draw a legend, maybe placing it outside axes and resizing the figure.

Parameters:
  • legend_data (dict) – Dictionary mapping label names (or two-element tuples where the second element is a label name) to matplotlib artist handles. The default reads from self._legend_data.

  • title (string) – Title for the legend. The default reads from self._hue_var.

  • label_order (list of labels) – The order that the legend entries should appear in. The default reads from self.hue_names.

  • adjust_subtitles (bool) – If True, modify entries with invisible artists to left-align the labels and set the font size to that of a title.

  • kwargs (key, value pairings) – Other keyword arguments are passed to the underlying legend methods on the Figure or Axes object.

Returns:

self – Returns self for easy chaining.

Return type:

Grid instance

cytoflow.views.set_titles(self, template=None, row_template=None, col_template=None, **kwargs)[source]#

Draw titles either above each facet or on the grid margins.

Parameters:
  • template (string) – Template for all titles with the formatting keys {col_var} and {col_name} (if using a col faceting variable) and/or {row_var} and {row_name} (if using a row faceting variable).

  • row_template – Template for the row variable when titles are drawn on the grid margins. Must have {row_var} and {row_name} formatting keys.

  • col_template – Template for the column variable when titles are drawn on the grid margins. Must have {col_var} and {col_name} formatting keys.

Returns:

self – Returns self.

Return type:

object

cytoflow.views.tight_layout(self, *args, **kwargs)[source]#

Submodules#