axis_y: axis_y

Description Usage Arguments Examples

View source: R/script - Axomatic.r

Description

Simplified function for defining the y axis with settings for tickmarks and labels. The function is used as a ggplot object.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
axis_y(
  from,
  to,
  ticks = 1,
  labels = 1,
  pad = 0,
  upperPad = NA,
  lowerPad = NA,
  expand = 0,
  upperExp = NA,
  lowerExp = NA,
  trans = "identity",
  trans_labels = "none"
)

Arguments

from

Start of the axis.

to

End of the axis.

ticks

How much space between each tickmark.

labels

The numbers or text beneath the tickmarks. 0 = no labels, 1 = label on every tickmark, 5 = label every 5'th tickmark, and so on. Setting this paramter as a vector lets you make self-defined labels, e.g. you can write c("one","two","three","four") or whatever.

pad

How much space before and after the first and last mark on the axis.

upperPad

specification of pad, but only for space after the last mark.

lowerPad

specifiction of pad, but only for spcae before the first mark.

trans_labels

"none": Does nothing (default). Lognatural: Transforms numerical labels back to non-logarithmic form if the axis data is log transformed

Examples

1
axis_y(from=0, to=20, ticks=1, labels=5, pad=2) #makes an axis going from 0 to 20, with 20 tickmarks, and labels every 5th tickmark, and a space of 2 before and after te marks.

Eiriksen/axomatic documentation built on Dec. 29, 2021, 2:38 a.m.