plot_histogram_general: plot a nicer-looking histogram

View source: R/plotting.R

plot_histogram_generalR Documentation

plot a nicer-looking histogram

Description

plot a nicer-looking histogram

Usage

plot_histogram_general(
  vec,
  special_value,
  breaks,
  vline_values,
  limits,
  plot_title,
  plot_xlab
)

Arguments

vec

numeric vector of valuse from which to make histogram

special_value

optional parameter. If specified, should be numeric vector of length 1. Plot the bar for this value in a different colour. Used, for example, to draw attention to the bar at x = 0.

breaks

optional parameter. If specified, should be numeric vector. Specifies breaks on horizontal axis. If not given, use horizontal axis limits as breaks.

vline_values

optional parameter. If specified, should be numeric vector. Plot vertical lines at these values.

limits

optional parameter. If specified, should be numeric vector of length 2. Use as horizontal axis limits. If not given use the range of vec (if there are values below 0) or 0, max(vec) (if there are no values below zero).

plot_title

optional parameter. If specified, should be character vector of length 1. Title of plot.

plot_xlab

character vector of length 1. Horizontal axis label.

Value

ggplot object


ada-w-yan/deltaomicron1 documentation built on June 24, 2022, 5:41 a.m.