Description Usage Arguments Examples
A rect is defined by the coordinates of its sides. Bars and tiles are convenient parameterisations based on the length of the sides.
1 2 3 4 5 6 | render_rect(data, x1, y1, x2, y2)
render_bar(data, x, y, width = resolution(x) * 0.9, halign = 0.5)
render_tile(data, x, y, width = resolution(x), height = resolution(y),
halign = 0.5, valign = 0.5)
|
data |
A data frame. |
x1,y1,x2,y2 |
Describe a rectangle by the locations of its sides. |
x,y,width,height |
Describe a rectangle by location and dimension. |
halign,valign |
Horizontal and vertical aligned. Defaults to 0.5, centered. |
1 2 3 4 5 6 7 | # Two equivalent specifications
render_rect(mtcars, ~cyl - 0.5, ~gear - 0.5, ~cyl + 0.5, ~gear + 0.5)
render_tile(mtcars, ~cyl, ~gear, 1, 1)
bar_ex
bar_ex %>% plot()
bar_ex %>% geometry_stack() %>% plot()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.