logTicks: Add axes and tick marks to a log-log plot to represent...

View source: R/plotting.R

logTicksR Documentation

Add axes and tick marks to a log-log plot to represent unlogged values

Description

Useful because you can then interpret the unlogged values, e.g. Figures 2(h) and 6(b) of MEE paper and Figure 7 of MEPS paper.

Usage

logTicks(
  xLim,
  yLim = NULL,
  tclSmall = -0.2,
  xLabelSmall = NULL,
  yLabelSmall = NULL,
  xLabelBig = NULL,
  mgpVal = c(1.6, 0.5, 0)
)

Arguments

xLim

the x limits for the plot (unlogged scale); if NULL then do not add anything to x-axis

yLim

the y limits for the plot (unlogged scale); if NULL then do not add anything to y-axis

tclSmall

size of small tick marks

xLabelSmall

which small tick marks on x-axis to label

yLabelSmall

which small tick marks on y-axis to label

xLabelBig

which big tick marks on the x-axis to label (when automated they can overlap, so may need to specify)

mgpVal

mgp values for axes. See ?par

Value

Adds axes and big and small tick marks to the plot. Returns NULL

Author(s)

Andrew Edwards

Examples

## Not run: 
# Adapt the following (could make an explicit example):
  plot(..., log="xy", xlab=..., ylab=..., xlim=..., ylim=..., axes=FALSE)
  xLim = 10^par("usr")[1:2]
  yLim = 10^par("usr")[3:4]
  logTicks(xLim, yLim, xLabelSmall = c(5, 50, 500))

## End(Not run)

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