plot_density: Create a density plot, showing the distribution of each...

View source: R/plot_distribution.R

plot_densityR Documentation

Create a density plot, showing the distribution of each column of data.

Description

Density plots and boxplots are cousins and provide very similar views of data distributions. Some people like one, some the other. I think they are both colorful and fun!

Usage

plot_density(
  data,
  colors = NULL,
  expt_names = NULL,
  position = "identity",
  direct = NULL,
  fill = NULL,
  plot_title = NULL,
  scale = NULL,
  colors_by = "condition",
  label_chars = 10,
  ...
)

Arguments

data

Expt, expressionset, or data frame.

colors

Color scheme to use.

expt_names

Names of the samples.

position

How to place the lines, either let them overlap (identity), or stack them.

direct

Use direct.labels for labeling the plot?

fill

Fill the distributions? This might make the plot unreasonably colorful.

plot_title

Title for the plot.

scale

Plot on the log scale?

colors_by

Factor for coloring the lines

label_chars

Maximum number of characters in sample names before abbreviation.

...

sometimes extra arguments might come from graph_metrics()

Value

ggplot2 density plot!

See Also

[ggplot2]

Examples

## Not run: 
 funkytown <- plot_density(data)

## End(Not run)

elsayed-lab/hpgltools documentation built on May 9, 2024, 5:02 a.m.