scale_show_infinites_y | R Documentation |
Will replace infinite values by the nearest limit.
scale_show_infinites_y( 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:
|
... |
Arguments passed on to |
ScaleContinuousPosition object that can be added to a ggplot object using '+'
scale_show_infinites_x()
## 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=carb, y=qsec2)) + ggplot2::geom_point() + scale_show_infinites_y() # Plot on a log10 scale with infinites set to nearest limit data %>% ggplot2::ggplot(ggplot2::aes(x=carb, y=qsec2)) + ggplot2::geom_point() + scale_show_infinites_y(trans="log10") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.