pegasus.ridgeplot¶
- pegasus.ridgeplot(data, features, donor_attr=None, qc_attr=None, overlap=0.5, left_adjust=0.35, panel_size=(6, 4), return_fig=False, dpi=300.0, **kwargs)[source]¶
Generate ridge plots, up to 8 features can be shown in one figure.
- Parameters
data (UnimodalData or MultimodalData object) – CITE-Seq or Cyto data.
features (str or List[str]) – One or more features to display.
donor_attr (str, optional, default None) – If not None, features must contain only one feature, plot this feature by donor indicated as donor_attr.
qc_attr (str, optional, default None) – If not None, only data.obs[qc_attr] == True are used.
overlap (float, default 0.5) – Overlap between adjacent ridge plots (top and bottom).
left_adjust (float, default 0.35) – Left margin for displaying labels.
panel_size (tuple, optional (default: (6, 4))) – The plot size (width, height) in inches.
return_fig (
bool
, optional, default:False
) – Return aFigure
object ifTrue
; returnNone
otherwise.dpi (
float
, optional, default:300.0
) – The resolution in dots per inch.
- Returns
A
matplotlib.figure.Figure
object containing the dot plot ifreturn_fig == True
- Return type
Figure object
Examples
>>> fig = pg.ridgeplot(data, features = ['CD8', 'CD4', 'CD3'], show = False, dpi = 500) >>> fig = pg.ridgeplot(data, features = 'CD3', donor_attr = 'assignment', show = False, dpi = 500)