opt_bar: Bar plots of co-clustering optimization results.

View source: R/opt_bar.R

opt_barR Documentation

Bar plots of co-clustering optimization results.

Description

Bar plots of co-clustering optimization results.

Usage

opt_bar(
  df.res,
  para.na,
  bar.width = 0.8,
  thr = NULL,
  title = NULL,
  title.size = 25,
  xlab = NULL,
  ylab = NULL,
  axis.title.size = 25,
  x.text.size = 25,
  y.text.size = 25,
  x.agl = 80,
  x.vjust = 0.6,
  fill = "#FF6666"
)

Arguments

df.res

A data.frame of co-clustering optimization results.

para.na

The targe parameter, which is a column name in df.res.

bar.width

Width of a single bar.

thr

A y-axis threshold, which will be used to draw a horizontal line.

title, title.size

The plot title and its size.

xlab, ylab

The x and y axis label respectively.

axis.title.size

The size of x and y axis labels.

x.text.size, y.text.size

The size of x and y axis text.

x.agl, x.vjust

The angle and vertical position of x-axis text.

fill

The color of bars.

Value

An object of ggplot.

Author(s)

Jianhai Zhang jzhan067@ucr.edu
Dr. Thomas Girke thomas.girke@ucr.edu

References

H. Wickham. ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York, 2016.

Examples

set.seed(10)
df.res <- data.frame(dimred=sample(c('PCA', 'UMAP'), 50, replace=TRUE), cluster=sample(c('wt', 'fg', 'le'), 50, replace=TRUE))
opt_bar(df.res=df.res, para.na='cluster', ylab='Remaining outcomes')

jianhaizhang/spatialHeatmap documentation built on Nov. 28, 2024, 4:44 p.m.