axis: Change size

Description Usage Arguments Details Examples

Description

Change plot size.

Usage

1
2
3
fun_x(p, type = NULL, label = NULL, domain = NULL)

fun_y(p, type = NULL, label = NULL, domain = NULL)

Arguments

p

Plot as initialised by funplot.

type

Scale for this axis, possible values linear or log.

label

Axis label.

domain

Possible axis values.

Details

fun_y domain parameter defaults to list(-7, 7). By default the domain of fun_x is computed with:

yDiff = height * (xDomain[1] - xDomain[0]) / width

Note: The origin is at the center of the graph by default so yDiff is split in half and distributed evenly to the ±y axis.

Examples

1
2
3
4
5
funplot() %>%
  fun_add("x ^ 2") %>%
  fun_x(label = "x axis", domain = list(-6, 6)) %>%
  fun_y(type = "log", "log scale") %>%
  fun_title("Custom axis")

JohnCoene/funplot documentation built on May 26, 2019, 7:28 a.m.