sqrtAxis: Determine square root axis tick mark positions

sqrtAxisR Documentation

Determine square root axis tick mark positions

Description

Determine square root axis tick mark positions, including positive and negative range values.

Usage

sqrtAxis(
  side = 1,
  x = NULL,
  pretty.n = 10,
  u5.bias = 0,
  big.mark = ",",
  plot = TRUE,
  las = 2,
  cex.axis = 0.6,
  ...
)

Arguments

side

integer value indicating the axis position, as used by axis(), 1=bottom, 2=left, 3=top, 4=right.

x

optional numeric vector representing the numeric range to be labeled.

pretty.n

numeric value indicating the number of desired tick marks, passed to pretty().

u5.bias

numeric value passed to pretty() to influence the frequency of intermediate tick marks.

big.mark

character value passed to format() which helps visually distinguish numbers larger than 1000.

plot

logical indicating whether to plot the axis tick marks and labels.

las, cex.axis

numeric values passed to axis() when drawing the axis, by default las=2 plots labels rotated perpendicular to the axis.

...

additional parameters are passed to pretty().

Details

This function calculates positions for tick marks for data that has been transformed with sqrt(), specifically a directional transformation like sqrt(abs(x)) * sign(x).

The main goal of this function is to provide reasonably placed tick marks using integer values.

Value

Invisibly returns a numeric vector of axis tick positions, named by the display label. The axis values are in square root space while the labels represent the normal space values.

invisible list with axis positions, and corresponding labels.

See Also

Other jam plot functions: adjustAxisLabelMargins(), coordPresets(), decideMfrow(), drawLabels(), getPlotAspect(), groupedAxis(), imageByColors(), imageDefault(), minorLogTicksAxis(), nullPlot(), plotPolygonDensity(), plotRidges(), plotSmoothScatter(), shadowText_options(), shadowText(), showColors(), smoothScatterJam(), usrBox()

Examples

plot(-3:3*10, -3:3*10, xaxt="n")
sqrtAxis(1)


jmw86069/jamba documentation built on Oct. 9, 2024, 10:52 a.m.