tau_guide_x: Control x-axis padding, label, scale & tick format

Description Usage Arguments References Examples

View source: R/guides.r

Description

Control x-axis padding, label, scale & tick format

Usage

1
2
3
tau_guide_x(tau, padding = NULL, label = NULL, label_padding = NULL,
  nice = NULL, auto_scale = NULL, tick_period = NULL,
  tick_format = NULL, min = NULL, max = NULL)

Arguments

tau

taucharts object

padding

space between axis ticks and chart panel

label

text of label for axis (overrides default use of variable name)

label_padding

space between axis ticks and axis label (can be negative)

nice

Taucharts engine tries to make axis scale "nice" by trying to start measure-based scale from 0 and adds some margins to complete scale with "nice" numbers. For example, if original scale domain contains values [8, 20, ... 40], then axis will have ticks from 0 to 45. (default: TRUE, if min and max values are set: FALSE).

auto_scale

(Deprecated) auto-pick "best" scale for axis? (default: TRUE (yes))

tick_period

if axis is auto-determined to be a "period scale", this allows specification of the period size. See References for more information.

tick_format

can be any D3 format specifier

min, max

manual minimum and maximum for the axis

References

http://api.taucharts.com/basic/guide.html, https://github.com/mbostock/d3/wiki/Formatting#d3_format

Examples

1
2
3
4
5
6
if (interactive()) {
tauchart(mtcars) %>%
 tau_point("mpg", "wt") %>%
 tau_guide_x(label="Miles/gallon", nice=FALSE) %>%
 tau_guide_y(label="Weight", nice=FALSE)
}

hrbrmstr/taucharts documentation built on May 18, 2018, 4:20 p.m.