make_barplot_on_models_stats: Bar plot of model stats

Description Usage Arguments Examples

View source: R/plot.R

Description

Use this function to produce a bar plot when the input is the result of using the table function to a numeric vector

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
make_barplot_on_models_stats(
  models.stats,
  cell.line = NULL,
  title,
  xlab,
  ylab,
  cont.values = FALSE,
  threshold = 0,
  ylim.add = 0
)

Arguments

models.stats

table object, the result of using table on a (numeric) vector. Usually it represents some models statistics summary - counts for each TP prediction value for example.

cell.line

string. The name of the cell line to be used in the title of the produced plot. Default value: NULL (the cell line name will not be added to the title)

title

string. The title of the plot

xlab

string. The title of the x-axis

ylab

string. The title of the y-axis

cont.values

logical. If TRUE, the values of the x-axis will be trimmed to 3 digits after the decimal point. Default value: FALSE.

threshold

integer. Values from the model.stats that are less or equal to the threshold will be pruned. Use it when there too many categories and the figure appears too dense. Default value: 0

ylim.add

integer. Signifies the height to add to the upper ylim parameter on the barplot, in addition to the maximum bar height across the whole plot. Default value is 0.

Examples

1
2
3
4
x = c(rep(1,100), rep(2,423), rep(3,231), rep(NaN,531))
make_barplot_on_models_stats(models.stats = table(x, useNA = "ifany"),
title = "True Positives Distribution across models",
xlab = "Number of TP values", ylab = "Number of models")

emba documentation built on Jan. 7, 2021, 9:09 a.m.