scale_show_infinites_x | R Documentation |
Will replace infinite values by the nearest limit.
scale_show_infinites_x( trans = "identity", limits = NULL, position = "bottom", breaks = ggplot2::waiver(), ... )
trans |
For continuous scales, the name of a transformation object or the object itself. Built-in transformations include "asn", "atanh", "boxcox", "date", "exp", "hms", "identity", "log", "log10", "log1p", "log2", "logit", "modulus", "probability", "probit", "pseudo_log", "reciprocal", "reverse", "sqrt" and "time". A transformation object bundles together a transform, its inverse,
and methods for generating breaks and labels. Transformation objects
are defined in the scales package, and are called |
limits |
One of:
|
position |
For position scales, The position of the axis.
|
breaks |
One of:
|
... |
Other arguments to ggplot2::scale_x_continuous or ggplot2::scale_y_continuous |
This function also allows you to pass arguments along to ggplot2::scale_x_continuous()
since once you add this call you won't be able to edit the continuous scale elsewhere.
Oftentimes you'll want to use the trans
argument to, for example, visualize your data on a log scale.
ScaleContinuousPosition object that can be added to a ggplot object using '+'
scale_show_infinites_y()
ggplot2::scale_x_continuous()
## Not run: data = mtcars dplyr::mutate(qsec2 = ifelse(qsec > 19, Inf, qsec)) # Plot with infinites set to nearest limit data %>% ggplot2::ggplot(ggplot2::aes(x=qsec2, y=carb)) + ggplot2::geom_point() + scale_show_infinites_x() # Plot on a log10 scale with infinites set to nearest limit data %>% ggplot2::ggplot(ggplot2::aes(x=qsec2, y=carb)) + ggplot2::geom_point() + scale_show_infinites_x(trans="log10") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.