tdm.plot.preprocess.ki67.plot_marker_distributions#

tdm.plot.preprocess.ki67.plot_marker_distributions(single_cell_df: DataFrame, marker: str | list[str], include_cell_types: list[str] | None = None, cell_type_col: str = 'cell_type', ax: Axes | None = None, axvline: float | None = None, xlim: float = 5, bw: float = 1.0, highlight_cell_types: list[str] | None = None)[source]#

Plot the distribution of a marker over multiple cell types.

Parameters:
  • ax (_type_) – a matplotlib axis

  • single_cell_df (pd.DataFrame) – dataframe with row per cell, columns for cell type and marker

  • marker (str) – name of the column with marker values

  • marker_cell_type (str) – cell type that the marker is associated with

  • cell_type_col (str) – name of the column with cell types

  • include_cells (list[str]) – list of cell types to include in the plot

  • axvline (float, optional) – x value to draw a dotted red line at. Defaults to 0.5.

  • xlim (float, optional) – maximal x value to plot. Defaults to 5.

  • bw (float, optional) – kdeplot bw. Defaults to 0.2.