Uses Grid graphics to draw a flower glyph
(Van Onzenoodt et al. 2023)
. Each variable in z
is depicted as a "petal" radiating from a central point, with the petal
length scaled according to the corresponding value in z. The
silhouette of each petal is generated from a continuous parametric taper
profile whose widening from the base and tapering towards the tip are
controlled independently by petal.base.shape and
petal.tip.shape. An optional notch at the tip, controlled by
petal.tip.notch, can be used to produce cleft (bifid) or heart-shaped
petals.
Usage
flowerglyphGrob(
x = 0.5,
y = 0.5,
z,
size = 1,
petal.width = 0.6,
petal.base.shape = 1,
petal.tip.shape = 1,
petal.tip.notch = 0,
petal.tip.notch.width = 0.15,
petal.base.notch = 0,
petal.base.notch.width = 0.15,
petal.waist = 0,
petal.waist.position = 0.5,
petal.waist.width = 0.15,
petal.curvature = 0,
petal.curvature.position = 0.7,
petal.curvature.width = 0.2,
edges = 30,
col = "black",
fill = NA,
lwd = 1,
alpha = 1,
angle.start = 0,
angle.stop = 2 * base::pi,
linejoin = c("mitre", "round", "bevel"),
scale.length = TRUE,
scale.area = FALSE,
centre = TRUE,
centre.size = 1,
col.centre = "black",
fill.centre = "black",
draw.grid = FALSE,
grid.levels = NULL,
col.grid = "grey",
lwd.grid = lwd
)Arguments
- x
A numeric vector or unit object specifying x-locations.
- y
A numeric vector or unit object specifying y-locations.
- z
A numeric vector specifying the values to be plotted as the length of the flower glyph petals.
- size
The size of the glyph (scales both petal length and width).
- petal.width
The width of a petal (as a proportion of
size|) at its widest point.- petal.base.shape
A positive numeric value controlling how rapidly the petal widens from its base. Smaller values produce a broader attachment to the centre of the glyph, whereas larger values delay the expansion of the petal, producing a narrower, more clawed base.
- petal.tip.shape
A positive numeric value controlling how rapidly the petal tapers towards its tip. Smaller values produce broader, more rounded tips, whereas larger values concentrate the petal width closer to its middle, producing progressively narrower, more pointed or lanceolate tips.
- petal.tip.notch
A numeric value controlling deformation of the petal tip. A value of
0produces a smooth, unmodified tip. Positive values (typically \(> 0\)) create an increasingly deep inward cleft with smooth shoulders, producing retuse, emarginate, obcordate, or bifid petal tips. Negative values extend the tip beyond its nominal length, producing progressively more acuminate, cuspidate, or aristate tips.- petal.tip.notch.width
A positive numeric value controlling the breadth of the tip notch. Smaller values produce a narrow, sharply incised cleft, or point, whereas larger values produce a broader, more rounded indentation or extension.
- petal.base.notch
A numeric value controlling deformation of the petal base. A value of
0produces a smooth, unmodified base. Positive values shift the basal shoulders backward relative to the central notch vertex (which remains anchored at the origin), producing cordate, sagittate, reniform, hastate, or auriculate petal shapes. Negative values extend the base into a basal protrusion or claw.- petal.base.notch.width
A positive numeric value controlling the breadth of the basal notch or protrusion. Smaller values produce a narrow, sharply defined sinus or point, whereas larger values produce a broader, more rounded basal indentation or extension.
- petal.waist
A numeric value controlling the depth of a constriction along the petal. A value of
0produces a uniformly tapered petal, whereas larger values produce an increasingly pronounced narrowing, resulting in pandurate, fiddle-shaped, or otherwise constricted petals.- petal.waist.position
A numeric value between
0and1controlling the position of the waist along the petal axis, where0corresponds to the base and1to the tip.- petal.waist.width
A positive numeric value controlling the breadth of the waist. Smaller values produce a sharp, localized constriction, whereas larger values produce a broader, more gradual narrowing.
- petal.curvature
A numeric value or vector controlling the curvature of the petal centreline. A value of
0produces a straight petal, whereas single positive or negative values produce simple arcuate or falcate (C-shaped) curvature in opposite directions. Passing a vector specifies multiple curvature bends along the petal axis; for example, a vector of length 2 with opposing signs (e.g.,c(3.0, -3.0)) produces a sigmoid (S-shaped) petal.- petal.curvature.position
A numeric value or vector between
0and1controlling the position of maximum curvature along the petal axis, where0corresponds to the base and1to the tip. Whenpetal.curvatureis a vector specifying multiple bends (e.g., for sigmoid shapes), this parameter specifies the location along the axis for each corresponding bend.- petal.curvature.width
A positive numeric value controlling the breadth of the region over which the petal bends. Smaller values concentrate the curvature into a localized bend, whereas larger values distribute the curvature more evenly along the petal, producing a broader, more gradual arc.
- edges
The number of points used to approximate the taper profile of one side of a petal. Higher values give smoother petal outlines.
- col
The petal outline colour.
- fill
The petal fill colour.
- lwd
The petal outline line width.
- alpha
The alpha transparency value.
- angle.start
The start angle for the petals in radians. Default is zero.
- angle.stop
The stop angle for the petals in radians. Default is \(2\pi\).
- linejoin
The line join style for the petal outlines. Either
"mitre","round"or"bevel".- scale.length
logical. If
TRUE, the petal lengths are scaled according to value ofz.- scale.area
logical. If
TRUE, the area of the petals are scaled according to value ofz.- centre
logical. If
TRUE, a central point is drawn at the glyph origin. Default isTRUE.- centre.size
The size (radius, in mm) of the central point.
- col.centre
The line colour of the central point.
- fill.centre
The fill colour of the central point.
- draw.grid
logical. If
TRUE, grid levels are plotted as nested petals. Default isFALSE.- grid.levels
A list of grid levels (as vectors) corresponding to the values in
zat which points are to be plotted. The values inzshould be present in the list specified.- col.grid
The colour of the nested grid petal lines.
- lwd.grid
The line width of the nested grid petal lines.
Value
A gTree object.
References
Van Onzenoodt C, Vazquez P, Ropinski T (2023). “Out of the plane: Flower versus star glyphs to support high-dimensional exploration in two-dimensional embeddings.” IEEE Transactions on Visualization and Computer Graphics, 29(12), 5468–5482.
Examples
library(ggmultiglyph)
library(grid)
library(gridExtra)
z <- c(0.5, 0.8, 1.2, 0.6, 1, 0.7)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust length and area scaling
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust flower size
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 10,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 10,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 10,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust circle size
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 2.5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 2.5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 2.5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 5,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust angle
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
angle.start = 0, angle.stop = base::pi)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
angle.start = 90 * (base::pi/180),
angle.stop = 270 * (base::pi/180))
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
angle.start = 0, angle.stop = base::pi)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20, centre.size = 1,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
angle.start = 90 * (base::pi/180),
angle.stop = 270 * (base::pi/180))
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
angle.start = 0, angle.stop = base::pi)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
angle.start = 90 * (base::pi/180),
angle.stop = 270 * (base::pi/180))
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust line widths
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
lwd = 3)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
lwd = 5)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
lwd = 3)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
lwd = 5)
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
lwd = 3)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
lwd = 5)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust centre colour and fill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
col.centre = "salmon", fill.centre = "white")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
col.centre = "cyan", fill.centre = "white")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
col.centre = "green", fill.centre = "white")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
col.centre = "salmon", fill.centre = "white")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
col.centre = "cyan", fill.centre = "white")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
col.centre = "green", fill.centre = "white")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
col.centre = "salmon", fill.centre = "white")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
col.centre = "cyan", fill.centre = "white")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
col.centre = "green", fill.centre = "white")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
fill.centre = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
fill.centre = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
centre.size = 5,
fill.centre = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
fill.centre = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
fill.centre = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
centre.size = 5,
fill.centre = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
fill.centre = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
fill.centre = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
centre.size = 5,
fill.centre = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust petal colour and fill
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
col = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
col = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
col = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
col = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
col = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
col = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
col = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
col = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
col = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
fill = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
fill = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
fill = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
fill = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
fill = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
fill = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
fill = "salmon")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
fill = "cyan")
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
fill = "green")
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Multivariate petal fill and colour
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
fill = RColorBrewer::brewer.pal(6, "Dark2"))
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
fill = RColorBrewer::brewer.pal(6, "Dark2"))
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = FALSE,
fill = RColorBrewer::brewer.pal(6, "Dark2"))
grid.arrange(fg1, fg2, fg3, nrow = 1)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25, lwd = 3,
scale.area = TRUE, scale.length = FALSE,
col = RColorBrewer::brewer.pal(6, "Dark2"))
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25, lwd = 3,
scale.area = FALSE, scale.length = TRUE,
col = RColorBrewer::brewer.pal(6, "Dark2"))
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = z,
size = 20,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25, lwd = 3,
scale.area = FALSE, scale.length = FALSE,
col = RColorBrewer::brewer.pal(6, "Dark2"))
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust grid levels
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gl <- split(x = c(rep(c(1, 2, 3), 4),
rep(c(1, 2, 3, 4), 2)),
f = c(rep(1:4, each = 3),
rep(5:6, each = 4)))
gl
#> $`1`
#> [1] 1 2 3
#>
#> $`2`
#> [1] 1 2 3
#>
#> $`3`
#> [1] 1 2 3
#>
#> $`4`
#> [1] 1 2 3
#>
#> $`5`
#> [1] 1 2 3 4
#>
#> $`6`
#> [1] 1 2 3 4
#>
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1, 3, 2, 1, 2, 3),
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
draw.grid = TRUE, grid.levels = gl,
fill = "white", col.grid = "black")
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1, 3, 2, 1, 2, 3),
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
draw.grid = TRUE, grid.levels = gl,
fill = "white", col.grid = "black")
grid.arrange(fg1, fg2, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjust fill and grid level colours
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gl <- split(x = c(rep(c(1, 2, 3), 4),
rep(c(1, 2, 3, 4), 2)),
f = c(rep(1:4, each = 3),
rep(5:6, each = 4)))
gl
#> $`1`
#> [1] 1 2 3
#>
#> $`2`
#> [1] 1 2 3
#>
#> $`3`
#> [1] 1 2 3
#>
#> $`4`
#> [1] 1 2 3
#>
#> $`5`
#> [1] 1 2 3 4
#>
#> $`6`
#> [1] 1 2 3 4
#>
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1, 3, 2, 1, 2, 3),
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = TRUE, scale.length = FALSE,
draw.grid = TRUE, grid.levels = gl,
col = "white", col.grid = "white",
fill = RColorBrewer::brewer.pal(6, "Dark2"))
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1, 3, 2, 1, 2, 3),
size = 15,
petal.base.shape = 1.25, petal.tip.shape = 1,
petal.width = 0.25,
scale.area = FALSE, scale.length = TRUE,
draw.grid = TRUE, grid.levels = gl,
col = "white", col.grid = "white",
fill = RColorBrewer::brewer.pal(6, "Dark2"))
grid.arrange(fg1, fg2, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjusting petal shape
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Petal width
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 1,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 2,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Tip shape
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 0.5,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 2,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Base shape
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjusting petal notch
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Base notch
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0.9,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0,
scale.area = FALSE, scale.length = FALSE)
fg4 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = -0.9,
scale.area = FALSE, scale.length = FALSE)
fg5 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = -0.5,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(arrangeGrob(fg1, fg2, nrow = 1),
arrangeGrob(fg3),
arrangeGrob(fg4, fg4, nrow = 1),
nrow = 3)
# Base notch width
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0.5,
petal.base.notch.width = 0.05,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0.5,
petal.base.notch.width = 0.1,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.base.notch = 0.5,
petal.base.notch.width = 0.15,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Tip notch
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0.9,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0,
scale.area = FALSE, scale.length = FALSE)
fg4 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = -0.9,
scale.area = FALSE, scale.length = FALSE)
fg5 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = -0.5,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(arrangeGrob(fg1, fg2, nrow = 1),
arrangeGrob(fg3),
arrangeGrob(fg4, fg4, nrow = 1),
nrow = 3)
# Base notch width
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0.5,
petal.tip.notch.width = 0.05,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0.5,
petal.tip.notch.width = 0.1,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.tip.notch = 0.5,
petal.tip.notch.width = 0.15,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjusting petal curvature
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Curvature
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = 0,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = 2.5,
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Curvature position
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.position = 0.2,
scale.area = FALSE, scale.length = TRUE)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.position = 0.5,
scale.area = FALSE, scale.length = TRUE)
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.position = 0.8,
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Curvature width
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.width = 0.05,
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.width = 0.2,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = -2.5,
petal.curvature.width = 0.5,
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Sigmoid curve
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = c(4, -4),
petal.curvature.position = c(0.2, 0.5),
scale.area = FALSE, scale.length = TRUE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = c(0, 0),
petal.curvature.position = 0.2,
scale.area = FALSE, scale.length = TRUE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(1), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 1,
petal.width = 0.15,
petal.curvature = c(-4, 4),
petal.curvature.position = c(0.2, 0.5),
scale.area = FALSE, scale.length = TRUE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Adjusting petal waist
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Waist
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.75,
petal.waist = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.75,
petal.waist = 0,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.75,
petal.waist = -0.5,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Waist width
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.05,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.15,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.3,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
# Waist position
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.05,
petal.waist.position = 0.1,
scale.area = FALSE, scale.length = FALSE)
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.05,
petal.waist.position = 0.5,
scale.area = FALSE, scale.length = FALSE)
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.5, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
petal.waist = 0.5,
petal.waist.width = 0.05,
petal.waist.position = 0.9,
scale.area = FALSE, scale.length = FALSE)
grid.arrange(fg1, fg2, fg3, nrow = 1)
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Generate botanical shapes
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Linear
fg1 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.2, petal.tip.shape = 0.2,
petal.width = 0.2,
scale.area = FALSE, scale.length = FALSE)
ant1 <- textGrob(label = "Linear",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Lanceolate
fg2 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.8, petal.tip.shape = 2.5,
petal.width = 0.4,
scale.area = FALSE, scale.length = FALSE)
ant2 <- textGrob(label = "Lanceolate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Oblong
fg3 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.3, petal.tip.shape = 0.3,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
ant3 <- textGrob(label = "Oblong",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Elliptic
fg4 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
ant4 <- textGrob(label = "Elliptic",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Ovate
fg5 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.8, petal.tip.shape = 1.8,
petal.width = 0.6,
scale.area = FALSE, scale.length = FALSE)
ant5 <- textGrob(label = "Ovate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Obovate
fg6 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1.8, petal.tip.shape = 0.8,
petal.width = 0.6,
scale.area = FALSE, scale.length = FALSE)
ant6 <- textGrob(label = "Obovate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Orbicular
fg7 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 0.6,
petal.width = 1,
scale.area = FALSE, scale.length = FALSE)
ant7 <- textGrob(label = "Orbicular",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Spatulate
fg8 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 4, petal.tip.shape = 0.9,
petal.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
ant8 <- textGrob(label = "Spatulate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Cuneate
fg9 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2, petal.tip.shape = 0.4,
petal.width = 0.6,
scale.area = FALSE, scale.length = FALSE)
ant9 <- textGrob(label = "Cuneate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Cuneate
fg9 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2, petal.tip.shape = 0.4,
petal.width = 0.6,
scale.area = FALSE, scale.length = FALSE)
ant9 <- textGrob(label = "Cuneate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Deltoid
fg10 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.3, petal.tip.shape = 2.5,
petal.width = 0.7,
scale.area = FALSE, scale.length = FALSE)
ant10 <- textGrob(label = "Deltoid",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Rhomboid
fg11 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1.5, petal.tip.shape = 1.5,
petal.width = 0.7,
scale.area = FALSE, scale.length = FALSE)
ant11 <- textGrob(label = "Rhomboid",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Flabellate
fg12 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2, petal.tip.shape = 0.2,
petal.width = 0.8,
petal.tip.notch = -0.05,
petal.tip.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant12 <- textGrob(label = "Flabellate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Oblanceolate
fg13 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2.5, petal.tip.shape = 0.8,
petal.width = 0.45,
scale.area = FALSE, scale.length = FALSE)
ant13 <- textGrob(label = "Oblanceolate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Pandurate (fiddle-shaped)
fg14 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1, petal.tip.shape = 1,
petal.width = 0.75,
petal.waist = 0.65,
petal.waist.position = 0.50,
petal.waist.width = 0.12,
scale.area = FALSE, scale.length = FALSE)
ant14 <- textGrob(label = "Pandurate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Falcate (sickle-shaped)
fg15 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.5, petal.tip.shape = 2,
petal.width = 0.2,
petal.curvature = 2.8,
petal.curvature.position = 0.3,
petal.curvature.width = 0.5,
scale.area = FALSE, scale.length = FALSE)
ant15 <- textGrob(label = "Falcate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Cordate (Heart-shaped)
fg16 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.6, petal.tip.shape = 2,
petal.width = 0.8,
petal.base.notch = 0.25,
petal.base.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant16 <- textGrob(label = "Cordate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Obcordate (Inverted heart-shaped)
fg17 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 2, petal.tip.shape = 0.6,
petal.width = 0.8,
petal.tip.notch = 0.25,
petal.tip.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant17 <- textGrob(label = "Obcordate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Reniform (Kidney-shaped)
fg18 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.6, petal.tip.shape = 0.5,
petal.width = 1.3,
petal.base.notch = 0.35,
petal.base.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant18 <- textGrob(label = "Reniform",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Sagittate (Arrowhead-shaped)
fg19 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.4, petal.tip.shape = 2.5,
petal.width = 0.3,
petal.base.notch = 0.25,
petal.base.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant19 <- textGrob(label = "Sagittate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Hastate (Spear-shaped, flaring lobes)
fg20 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 0.2, petal.tip.shape = 2.8,
petal.width = 0.75,
petal.base.notch = 0.12,
petal.base.notch.width = 0.01,
scale.area = FALSE, scale.length = FALSE)
ant20 <- textGrob(label = "Hastate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
# Auriculate (Ear-lapped base)
fg21 <- flowerglyphGrob(x = unit(0.5, "npc"), y = unit(0.1, "npc"),
z = c(0.5), size = 20,
petal.base.shape = 1.5, petal.tip.shape = 1.0,
petal.width = 0.5,
petal.base.notch = 0.10,
petal.base.notch.width = 0.04,
scale.area = FALSE, scale.length = FALSE)
ant21 <- textGrob(label = "Auriculate",
x = unit(0.5, "npc"), y = unit(0.4, "npc"),
gp = gpar(fontsize = 12, fontface = "bold"))
grid.arrange(
arrangeGrob(fg1, ant1, nrow = 2),
arrangeGrob(fg2, ant2, nrow = 2),
arrangeGrob(fg3, ant3, nrow = 2),
arrangeGrob(fg4, ant4, nrow = 2),
arrangeGrob(fg5, ant5, nrow = 2),
arrangeGrob(fg6, ant6, nrow = 2),
nrow = 2)
grid.arrange(
arrangeGrob(fg7, ant7, nrow = 2),
arrangeGrob(fg8, ant8, nrow = 2),
arrangeGrob(fg9, ant9, nrow = 2),
arrangeGrob(fg10, ant10, nrow = 2),
arrangeGrob(fg11, ant11, nrow = 2),
arrangeGrob(fg12, ant12, nrow = 2),
nrow = 2)
grid.arrange(
arrangeGrob(fg13, ant13, nrow = 2),
arrangeGrob(fg14, ant14, nrow = 2),
arrangeGrob(fg15, ant15, nrow = 2),
arrangeGrob(fg16, ant16, nrow = 2),
arrangeGrob(fg17, ant17, nrow = 2),
arrangeGrob(fg18, ant18, nrow = 2),
nrow = 2)
grid.arrange(
arrangeGrob(fg19, ant19, nrow = 2),
arrangeGrob(fg20, ant20, nrow = 2),
nrow = 1)