linearGradient(col = c("black", "white"), stops = seq(0, 1, length.out = length(col)), gradientUnits = c("bbox", "coords"), x0 = unit(0, "npc"), x1 = unit(1, "npc"), y0 = unit(0, "npc"), y1 = unit(1, "npc"), default.units = "npc", spreadMethod = c("pad", "reflect", "repeat"))
radialGradient(col = c("black", "white"), stops = seq(0, 1, length.out = length(col)), gradientUnits = c("bbox", "coords"), x = unit(0.5, "npc"), y = unit(0.5, "npc"), r = unit(0.5, "npc"), fx = unit(0.5, "npc"), fy = unit(0.5, "npc"), default.units = "npc", spreadMethod = c("pad", "reflect", "repeat"))col) at.
"bbox", the gradient is positioned relative to the
bounding box of the referring grob. All units attempt to be
converted to equivalent "npc" coordinates as a result. If "coords", uses grid coordinates to determine positioning.
x, y,
r, fx or fy are only given as numeric vectors.
gradient object.
col and stops, the
order is important. Gradient stops which are defined earlier are drawn
first, with later stops being drawn over the top. For spreadMethod the possible values are: