gap.barplot.cust: Customising 'plotrix::gap.barplot' for a histogram with a gap...

gap.barplot.custR Documentation

Customising plotrix::gap.barplot for a histogram with a gap in y-axis

Description

For Figure 1 of MEE paper, to make a histogram (barplot) with a gap in the y-axis. Customising gap.barplot() from the package plotrix by Jim Lemon and others Several default options here are customised for the particular plot (and to change a few of the defaults in gap.barplot) so the code would require some modifiying to use more generally.

Usage

gap.barplot.cust(
  y,
  gap = c(9, 980),
  xaxlab,
  xtics,
  yaxlab,
  ytics = c(seq(0, 8, by = 4), seq(980, 988, by = 4)),
  midpoints,
  breakpoints,
  xlim,
  ylim = c(0, 17),
  xlab = expression(paste("Values, ", italic(x))),
  ylab = "Count in each bin",
  horiz = FALSE,
  col = NULL,
  N = 1000,
  ...
)

Arguments

y

vector of data values

gap

range of values to be left out

xaxlab

labels for the x axis ticks

xtics

position of the x axis ticks

yaxlab

labels for the y axis ticks

ytics

position of the y axis ticks

midpoints

midpoints of the bins

breakpoints

breaks of the bins

xlim

optional x limits for the plot

ylim

optional y limits for the plot

xlab

label for the x axis

ylab

label for the y axis

horiz

whether to have vertical or horizontal bars

col

color(s) in which to plot the values

N

value of highest top short tickmark

...

arguments passed to 'barplot'.

Details

This function modifies plotrix::gap.barplot(), between 2nd Sept 2014 and finalised here in October 2019. plotrix was written by Jim Lemon and others and is available from CRAN at https://cran.r-project.org/web/packages/plotrix/index.html.

Value

Barplot with a gap in the y-axis

Author(s)

Andrew Edwards


andrew-edwards/sizeSpectra documentation built on June 28, 2023, 7:09 p.m.