This set of scales defines new colour scales for edge geoms equivalent to the
ones already defined by ggplot2. The parameters are equivalent to the ones
from ggplot2 so there is nothing new under the sun. The different geoms will
know whether to use edge scales or the standard scales so it is not necessary
to write edge_colour
in the call to the geom - just use colour
.
scale_edge_colour_hue(..., h = c(0, 360) + 15, c = 100, l = 65,
h.start = 0, direction = 1, na.value = "grey50")scale_edge_colour_brewer(..., type = "seq", palette = 1, direction = 1)
scale_edge_colour_distiller(..., type = "seq", palette = 1,
direction = -1, values = NULL, space = "Lab", na.value = "grey50",
guide = "edge_colourbar")
scale_edge_colour_gradient(..., low = "#132B43", high = "#56B1F7",
space = "Lab", na.value = "grey50", guide = "edge_colourbar")
scale_edge_colour_gradient2(..., low = muted("red"), mid = "white",
high = muted("blue"), midpoint = 0, space = "Lab",
na.value = "grey50", guide = "edge_colourbar")
scale_edge_colour_gradientn(..., colours, values = NULL, space = "Lab",
na.value = "grey50", guide = "edge_colourbar", colors)
scale_edge_colour_grey(..., start = 0.2, end = 0.8, na.value = "red")
scale_edge_colour_identity(..., guide = "none")
scale_edge_colour_manual(..., values)
scale_edge_colour_viridis(..., alpha = 1, begin = 0, end = 1,
discrete = FALSE, option = "D", direction = 1)
scale_edge_colour_continuous(..., low = "#132B43", high = "#56B1F7",
space = "Lab", na.value = "grey50", guide = "edge_colourbar")
scale_edge_colour_discrete(..., h = c(0, 360) + 15, c = 100, l = 65,
h.start = 0, direction = 1, na.value = "grey50")
scale_edge_color_hue(..., h = c(0, 360) + 15, c = 100, l = 65,
h.start = 0, direction = 1, na.value = "grey50")
scale_edge_color_brewer(..., type = "seq", palette = 1, direction = 1)
scale_edge_color_distiller(..., type = "seq", palette = 1, direction = -1,
values = NULL, space = "Lab", na.value = "grey50",
guide = "edge_colourbar")
scale_edge_color_gradient(..., low = "#132B43", high = "#56B1F7",
space = "Lab", na.value = "grey50", guide = "edge_colourbar")
scale_edge_color_gradient2(..., low = muted("red"), mid = "white",
high = muted("blue"), midpoint = 0, space = "Lab",
na.value = "grey50", guide = "edge_colourbar")
scale_edge_color_gradientn(..., colours, values = NULL, space = "Lab",
na.value = "grey50", guide = "edge_colourbar", colors)
scale_edge_color_grey(..., start = 0.2, end = 0.8, na.value = "red")
scale_edge_color_identity(..., guide = "none")
scale_edge_color_manual(..., values)
scale_edge_color_continuous(..., low = "#132B43", high = "#56B1F7",
space = "Lab", na.value = "grey50", guide = "edge_colourbar")
scale_edge_color_discrete(..., h = c(0, 360) + 15, c = 100, l = 65,
h.start = 0, direction = 1, na.value = "grey50")
scale_edge_color_viridis(..., alpha = 1, begin = 0, end = 1,
discrete = FALSE, option = "D", direction = 1)
Arguments passed on to discrete_scale
One of:
NULL
for no breaks
waiver()
for the default breaks computed by the
transformation object
A character vector of breaks
A function that takes the limits as input and returns breaks as output
A character vector that defines possible values of the scale and their order.
Should unused factor levels be omitted from the scale?
The default, TRUE
, uses the levels that appear in the data;
FALSE
uses all the levels in the factor.
Unlike continuous scales, discrete scales can easily show
missing values, and do so by default. If you want to remove missing values
from a discrete scale, specify na.translate = FALSE
.
If na.translate = TRUE
, what value aesthetic
value should missing be displayed as? Does not apply to position scales
where NA
is always placed at the far right.
The name of the scale
A palette function that when called with a single integer argument (the number of levels in the scale) returns the values that they should take
The name of the scale. Used as axis or legend title. If
waiver()
, the default, the name of the scale is taken from the first
mapping used for that aesthetic. If NULL
, the legend title will be
omitted.
One of:
NULL
for no labels
waiver()
for the default labels computed by the
transformation object
A character vector giving labels (must be same length as breaks
)
A function that takes the breaks as input and returns labels as output
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 expand_scale()
to generate the values for the expand
argument. The defaults are to
expand the scale by 5% on each side for continuous variables, and by
0.6 units on each side for discrete variables.
A function used to create a guide or its name. See
guides()
for more info.
The position of the axis. "left" or "right" for vertical scales, "top" or "bottom" for horizontal scales
The super class to use for the constructed scale
range of hues to use, in [0, 360]
chroma (intensity of colour), maximum value varies depending on combination of hue and luminance.
luminance (lightness), in [0, 100]
hue to start at
direction to travel around the colour wheel, 1 = clockwise, -1 = counter-clockwise
Colour to use for missing values
One of seq (sequential), div (diverging) or qual (qualitative)
If a string, will use that named palette. If a number, will
index into the list of palettes of appropriate type
if colours should not be evenly positioned along the gradient
this vector gives the position (between 0 and 1) for each colour in the
colours
vector. See rescale()
for a convience function
to map an arbitrary range to between 0 and 1.
colour space in which to calculate gradient. Must be "Lab" - other values are deprecated.
Type of legend. Use "colourbar"
for continuous
colour bar, or "legend"
for discrete colour legend.
Colours for low and high ends of the gradient.
colour for mid point
The midpoint (in data value) of the diverging scale. Defaults to 0.
Vector of colours to use for n-colour gradient.
gray value at low end of palette
gray value at high end of palette
pass through parameter to viridis
The (corrected) hue in [0,1] at which the viridis colormap begins.
generate a discrete palette? (default: FALSE
- generate continuous palette)
A character string indicating the colormap option to use. Four options are available: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"), "viridis" (or "D", the default option) and "cividis" (or "E").
A ggproto object inheriting from Scale
Other scale_edge_*: scale_edge_alpha
,
scale_edge_fill
,
scale_edge_linetype
,
scale_edge_shape
,
scale_edge_size
,
scale_edge_width
,
scale_label_size