| orb_scale | R Documentation |
Scales control how data values are converted to visual values: which colours a variable spans, how large points become, and the limits and transformation of the axes.
orb_scale_colour(palette = "viridis", limits = NULL, reverse = FALSE)
orb_scale_fill(palette = "viridis", limits = NULL, reverse = FALSE)
orb_scale_size(range = c(2, 14), limits = NULL)
orb_scale_x(limits = NULL, trans = "identity", breaks = NULL, expand = 0.04)
orb_scale_y(limits = NULL, trans = "identity", breaks = NULL, expand = 0.04)
palette |
Palette name (see |
limits |
Numeric length-2 vector giving the data range to map, or
|
reverse |
Reverse the direction of the palette. |
range |
Length-2 numeric vector giving the smallest and largest radius
in pixels, for |
trans |
Axis transformation: |
breaks |
Numeric vector of axis breaks, or |
expand |
Fraction of the data range added as padding at each end. |
An object of class orb_scale, to be added to a plot.
p <- orb(mtcars, x = wt, y = mpg, colour = hp) + orb_points()
p + orb_scale_colour("magma", reverse = TRUE)
p + orb_scale_y(limits = c(10, 35))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.