Description Usage Arguments Type Examples
Scale and modify axis.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | gauge_axis(g2, var, ..., nice = TRUE, range = NULL, ticks = NULL,
tick_count = NULL, tick_interval = NULL, min = NULL, max = NULL,
type = NULL, formatter = NULL, sync = TRUE, values = NULL,
base = NULL, exponent = NULL, mask = NULL, figure = NULL)
gauge_x_identity(g2, ..., figure = NULL)
gauge_y_identity(g2, ..., figure = NULL)
gauge_x_linear(g2, ..., nice = TRUE, range = NULL, ticks = NULL,
tick_count = NULL, tick_interval = NULL, min = NULL, max = NULL,
formatter = NULL, sync = TRUE, figure = NULL)
gauge_y_linear(g2, ..., nice = TRUE, range = NULL, ticks = NULL,
tick_count = NULL, tick_interval = NULL, min = NULL, max = NULL,
formatter = NULL, sync = TRUE, figure = NULL)
gauge_x_discrete(g2, ..., sync = TRUE, range = NULL,
formatter = NULL, ticks = NULL, tick_count = NULL, values = NULL,
figure = NULL)
gauge_y_discrete(g2, ..., sync = TRUE, range = NULL,
formatter = NULL, ticks = NULL, tick_count = NULL, values = NULL,
figure = NULL)
gauge_x_log(g2, ..., base = 2, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_y_log(g2, ..., base = 2, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_x_pow(g2, ..., exponent = 2, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_y_pow(g2, ..., exponent = 2, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_x_time(g2, ..., mask = NULL, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_y_time(g2, ..., mask = NULL, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL,
tick_interval = NULL, figure = NULL)
gauge_x_discrete_time(g2, ..., mask = NULL, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL, figure = NULL)
gauge_y_discrete_time(g2, ..., mask = NULL, nice = TRUE, sync = TRUE,
formatter = NULL, ticks = NULL, tick_count = NULL, figure = NULL)
gauge_all_axis(g2, ...)
hide_axes(g2)
hide_axis(g2)
|
g2 |
An object of class |
var |
Variable to scale. |
... |
Configuration options or a logical indicating whether to show the axis. |
nice |
The default is |
range |
The range of output data, defaults to |
ticks, tick_count, tick_interval |
Number of ticks to show or interval between ticks, only one of those can be set. |
min, max |
Minimum and Maximum of axes. |
type |
Type of data plotted against the axis |
formatter |
A callback function as returned by |
sync |
Wehter to unify axes scales across |
values |
Values of axes to use for categorical variables. |
base, exponent |
Used for |
mask |
Date time format. |
figure |
Name of figure to apply axis to, if |
identity
: Constant.
linear
: Continuous variable.
cat
: Categorical variable.
time
: Continous time variable.
timeCat
: Non-continuous time variable.
log
: Logarithmic data.
pow
: Exponential data.
1 2 3 4 5 6 | g <- g2(cars, asp(speed, dist)) %>%
fig_point()
g %>% gauge_x_linear(min = 0)
g %>% gauge_y_log(title = "Log")
g %>% gauge_x_linear(tick_count = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.