plotMetadataCategPie: Plot Metadata Category Pie Chart

View source: R/Seurat.Utils.Metadata.R

plotMetadataCategPieR Documentation

Plot Metadata Category Pie Chart

Description

Generates a pie chart visualizing the distribution of categories within a specified metadata column of a Seurat object.

Usage

plotMetadataCategPie(
  metacol = "Singlet.status",
  plot_name = paste(metacol, "distribution"),
  obj = combined.obj,
  max.categs = 20,
  both_pc_and_value = TRUE,
  subtitle = NULL,
  labels = NULL,
  LegendSide = FALSE,
  ...
)

Arguments

metacol

The metadata column to visualize.

plot_name

Name of the plot to generate.

obj

Seurat object containing the metadata. Default: combined.obj.

max.categs

The maximum number of categories to display in the pie chart. If the number of categories exceeds this value, an error is thrown.

both_pc_and_value

If TRUE, labels on the pie chart will show both the percentage and the count of each category. If FALSE, only the percentage is shown.

subtitle

Optional subtitle for the pie chart.

labels

Optional labels for the pie chart.

...

Additional arguments to pass to the pie chart plotting function.

Value

A pie chart visualizing the distribution of categories within the specified metadata column.

Examples

## Not run: 
plotMetadataCategPie(
  metacol = "Singlet.status",
  plot_name = "Singlet Status Distribution",
  obj = combined.obj,
  max.categs = 20,
  both_pc_and_value = TRUE
)

## End(Not run)


vertesy/Seurat.utils documentation built on Dec. 4, 2024, 5:20 p.m.