axis_blank: Add an axis to a plot without labels as the default

View source: R/axis_blank.R

axis_blankR Documentation

Add an axis to a plot without labels as the default

Description

A wrapper function for axis with three changes.

1. labels = FALSE is now the default. 2. tck has been added as an argument, which is used to specify the size of the tick mark. 3. minor has been added as an argument. Used to add minor (i.e., smaller) tickmarks equally between the first axis.

Usage

axis_blank(
  side,
  at = NULL,
  labels = FALSE,
  tick = TRUE,
  line = NA,
  pos = NA,
  outer = FALSE,
  font = NA,
  lty = "solid",
  lwd = 1,
  lwd.ticks = lwd,
  col = NULL,
  col.ticks = NULL,
  hadj = NA,
  padj = NA,
  gap.axis = NA,
  ...,
  tck = -0.02,
  minor = TRUE
)

Arguments

side

an integer specifying which side of the plot the axis is to be drawn on. The axis is placed as follows: 1=below, 2=left, 3=above and 4=right.

at

The points at which tick-marks are to be drawn. Non-finite (infinite, NaN or NA) values are omitted. By default (when NULL) tickmark locations are computed using axTicks.

labels

Set to FALSE. See axis.

tick

See axis.

line

See axis.

pos

See axis.

outer

See axis.

font

See axis.

lty

See axis.

lwd

See axis.

lwd.ticks

See axis.

col

See axis.

col.ticks

See axis.

hadj

See axis.

padj

See axis.

gap.axis

See axis.

...

Other graphical parameters that may apply to axis.

tck

The length of tick marks as a fraction of the smaller of the width or height of the plotting region. If tck >= 0.5 it is interpreted as a fraction of the relevant side, so if tck = 1 grid lines are drawn. The default setting is (tck = -0.025).

minor

Whether or not to add smaller tick marks spaced equally between the larger tickmarks specified by the at argument. Tick length is set to tck * 0.5.

Examples

## Not run: 
   blank(
     xlim = c(0,50),
     ylim = c(0,100),
     bty ="l"
   )
   
   axis_blank(1, at = seq(0,50,10))
   axis_blank(2, at = seq(0,100,20))
   

## End(Not run)


dapperstats/bbplot documentation built on June 11, 2022, 8:38 p.m.