Function to use in motif() and style specific elements.
element( ..., shape = NULL, figure = c("point", "area", "edge", "line", "interval", "polygon", "schema"), state = c("default", "active", "inactive", "selected") ) elementPoint( ..., shape = c("hollow-circle", "cross", "hypen", "line", "plus", "tick", "circle", "square", "bowtie", "diamond", "hexagon", "triangle", "triangle-down", "hollow-square", "hollow-bowtie", "hollow-triangle-down"), state = c("default", "active", "inactive", "selected") ) elementLine( ..., shape = c("line", "dot", "dash", "smooth", "hv", "vh", "hvh", "vhv"), state = c("default", "active", "inactive", "selected") ) elementArea( ..., shape = c("area", "smooth", "line", "smooth-line"), state = c("default", "active", "inactive", "selected") ) elementEdge( ..., shape = c("line", "vhv", "smooth", "arc"), state = c("default", "active", "inactive", "selected") ) elementInterval( ..., shape = c("rect", "hollow-rect", "line", "tick", "funnel", "pyramid"), state = c("default", "active", "inactive", "selected") ) elementPolygon(..., state = c("default", "active", "inactive", "selected")) elementSchema( ..., shape = c("box", "candle"), state = c("default", "active", "inactive", "selected") )
| ... | Key value pairs to pass to |
|---|---|
| shape | Shape to modify, if |
| figure | Figure to modify. |
| state | State of the shape to modify. |
element() will work for any figure, but other
functions may be more convienient to use.
element: Customise any element.
elementPoint: Customise point.
elementLine: Customise line.
elementArea: Customise area.
elementEdge: Customise edge.
elementInterval: Customise interval.
elementPolygon: Customise polygon.
elementSchema: Customise schema.
g2(iris, asp(Sepal.Width, Sepal.Length)) %>% fig_point( asp(color = Species, shape = "circle") ) %>% motif( brandColor = "orange", backgroundColor = "black", elementPoint( shape = "circle", stroke = "white", fillOpacity = .7 ) )