Scale and modify axis.
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)
An object of class g2r as returned by g2r.
Variable to scale.
Configuration options or a logical indicating whether to show the axis.
The default is TRUE, which is used to optimize the range of values so that the plotted axe is evenly distributed.
For example, the range of raw data is c(3, 97), and if nice is true, the range of values is adjusted to c(0, 100].
The range of output data, defaults to c(0, 1).
Number of ticks to show or interval between ticks, only one of those can be set.
Minimum and Maximum of axes.
Type of data plotted against the axis identity, linear, cat, time, timeCat, log, pow.
See type section for details.
A callback function as returned by cb.
Wehter to unify axes scales across planes.
Values of axes to use for categorical variables.
Used for type log and pow.
Date time format.
Name of figure to apply axis to, if NULL it is applied to all figures.
identity: Constant.
linear: Continuous variable.
cat: Categorical variable.
time: Continous time variable.
timeCat: Non-continuous time variable.
log: Logarithmic data.
pow: Exponential data.
# NOT RUN {
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)
# }
Run the code above in your browser using DataLab