overlayBarplots: Overlay two barplots

View source: R/plotting.R

overlayBarplotsR Documentation

Overlay two barplots

Description

Plots two histograms as densities by overlaying two barplots.

Usage

overlayBarplots(
  x1,
  x2,
  nbBins,
  leg1,
  leg2,
  cols = c(rgb(0, 0, 1, 1/4), rgb(1, 0, 0, 1/4)),
  main = "",
  xlab = "",
  ylab = ""
)

Arguments

x1

numeric vector for the first histogram

x2

numeric vector for the second histogram

nbBins

number of bins; will be the same for both histograms

leg1

legend for the first histogram

leg2

legend for the second histogram

cols

vector of colors, one per histogram

main

main title

xlab

label of the x-axis

ylab

label of the y-axis

Value

nothing

Author(s)

Timothee Flutre


timflutre/rutilstimflutre documentation built on Feb. 12, 2025, 11:35 p.m.