rotate | R Documentation |
Apply a rotation of a fixed angle to a figure
rotate(fig, n, rule, ...)
## S3 method for class 'figure'
rotate(fig, n = 4, rule = "rotation", ...)
fig |
The figure on which the rule is applied |
n |
integer, defines the angle of the rotation. Default is 4, which corresponds to a rotation of |
rule |
character, defines the rotation rule. Default is counterclockwise. If the rule arguments contain the string "inv" forces a clockwise rotation. Each corresponds to an |
... |
Other arguments |
A figure of class figure with different rotation coordinates
A figure of class figure with different rotation coordinates
rotate(figure)
: Rotate a figure
Apply a rotation of a fixed angle to a figure
# default luck
draw(luck())
# apply the default rotation on the default luck
draw(rotate(luck()))
# force clockwise rotation
draw(rotate(luck(), rule = "inv"))
# default luck
draw(luck())
# apply the default rotation on the default luck
draw(rotate(luck()))
# force clockwise rotation
draw(rotate(luck(), rule = "inv"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.