yaxis_ist: Tweak Y axis

Description Usage Arguments Examples

View source: R/options.R

Description

Tweak the y axis for chartist visualisation.

Usage

1
2
yaxis_ist(p, showLabel = TRUE, showGrid = TRUE, suffix = "",
  prefix = "", position, offset, labelOffset, scaleMinSpace, ...)

Arguments

p

a chartist object.

showLabel

set to FALSE to hide labels.

showGrid

set to FALSE to hide the grid.

suffix

add suffix to label.

prefix

add prefix to label.

position

positon of axis.

offset

offset axis.

labelOffset

offset labels, takes integer, vector or list (i.e.: 1, c(1,2), list(x = 1, y = 2).

scaleMinSpace

minimum height in pixel of scale.

...

additional options.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
mtcars$models <- row.names(mtcars)

mtcars[1:5,] %>%
    chart_ist(x = models, type = "bar") %>%
    add_ist(disp) %>%
    yaxis_ist(suffix = " $")

mtcars[1:10,] %>%
    chart_ist(x = mpg, type = "bar") %>%
    add_ist(disp) %>%
    yaxis_ist(offset = 200, labelOffset = list(x = -50, y = 0))

JohnCoene/chartist documentation built on May 7, 2019, 11:17 a.m.