Skip to contents

Scales to set up the visualisation of the radius aesthetic. These scales are also automatically used in plot guides. Note that scale_radius_identity() does not exist as it would be impossible to relate such a scale to the max_radius parameter. For more details see vignette("radius_aes").

Usage

scale_radius_continuous(..., range = c(1e-08, 1))

scale_radius_binned(..., range = c(1e-08, 1))

scale_radius_discrete(..., range = c(1e-08, 1))

Arguments

...

Arguments passed on to underpinning ggplot2::scale_* functions.

range

Relative output range of radii. Must lie between 0 and 1.

Value

An object of class Scale.

Author

Pepijn de Vries

Examples

if (requireNamespace("ggplot2")) {
  library(ggplot2)
  data(seawatervelocity)
  
  g_num <-
    ggplot() +
    geom_fields(data = seawatervelocity,
                aes(radius = as.numeric(v), angle = as.numeric(angle)))
  g_discr <-
    ggplot() +
    geom_fields(data = seawatervelocity,
                aes(radius = cut(as.numeric(v), 4), angle = as.numeric(angle)))
                
  g_num + scale_radius_continuous()
  g_num + scale_radius_binned()
  g_discr + scale_radius_discrete()
}
#> Angle correction between 0.00 and 0.00 radials