| scale-se | R Documentation |
The scale_xxx_xxx family of functions makes it easy to format axis text in decimal format, as percentages or as currencies.
scale_x_number_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "bottom",
sec.axis = waiver(),
accuracy = 1,
scale = 1,
prefix = "",
suffix = "",
big.mark = NULL,
decimal.mark = NULL,
trim = TRUE,
...
)
scale_x_percent_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "bottom",
sec.axis = waiver(),
accuracy = 1,
scale = 100,
prefix = "",
suffix = NULL,
big.mark = NULL,
decimal.mark = NULL,
trim = TRUE,
...
)
scale_x_currency_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "bottom",
sec.axis = waiver(),
accuracy = 1,
scale = 1,
prefix = NULL,
suffix = NULL,
big.mark = NULL,
decimal.mark = NULL,
currency = "SEK",
trim = TRUE,
...
)
scale_y_number_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "left",
sec.axis = waiver(),
accuracy = 1,
scale = 1,
prefix = "",
suffix = "",
big.mark = NULL,
decimal.mark = NULL,
trim = TRUE,
...
)
scale_y_percent_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "left",
sec.axis = waiver(),
accuracy = 1,
scale = 100,
prefix = "",
suffix = NULL,
big.mark = NULL,
decimal.mark = NULL,
trim = TRUE,
...
)
scale_y_currency_se(
name = waiver(),
breaks = waiver(),
minor_breaks = waiver(),
guide = waiver(),
n.breaks = NULL,
labels = waiver(),
limits = NULL,
expand = waiver(),
oob = censor,
na.value = NA_real_,
trans = "identity",
position = "left",
sec.axis = waiver(),
accuracy = 1,
scale = 1,
prefix = NULL,
suffix = NULL,
big.mark = NULL,
decimal.mark = NULL,
currency = "SEK",
trim = TRUE,
...
)
name |
The name of the scale. Used as the axis or legend title. If
|
breaks |
One of:
|
minor_breaks |
One of:
|
guide |
A function used to create a guide or its name. See
|
n.breaks |
An integer guiding the number of major breaks. The algorithm
may choose a slightly different number to ensure nice break labels. Will
only have an effect if |
labels |
One of:
|
limits |
One of:
|
expand |
For position scales, a vector of range expansion constants used to add some
padding around the data to ensure that they are placed some distance
away from the axes. Use the convenience function |
oob |
One of:
|
na.value |
Missing values will be replaced with this value. |
trans |
|
position |
For position scales, The position of the axis.
|
sec.axis |
|
accuracy |
A number to round to. Use (e.g.) Applied to rescaled data. |
scale |
A scaling factor: |
prefix |
Additional text to display before the number. The suffix is
applied to absolute value before |
suffix |
Additional text to display after the number. |
big.mark |
Character used between every 3 digits to separate thousands.
The default ( |
decimal.mark |
The character to be used to indicate the numeric
decimal point. The default ( |
trim |
Logical, if |
... |
Other arguments passed on to |
currency |
currency symbol |
the number ones format axis text in decimal format.
the percent ones format axis text as percentages.
the currency ones format axis text as currencies.
A ggplot2 scale, for use in a +-chained plot construction.
# not rendered via demo_number(): several locales' group/currency signs
# aren't in the check device's font, so only the (unrendered) scale
# objects are shown
scale_x_number_se()
scale_x_percent_se()
scale_x_currency_se()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.