shape {matRiks}R Documentation

Shape rule (Method)

Description

Apply a change in figures rule by change the visibility of the shapes in a figure

Usage

shape(fig, n, rule, ...)

## S3 method for class 'figure'
shape(fig, n = 1, rule = "shape", ...)

Arguments

fig

A vector of figures obtained with the concatenation of figures function (cof()). Three figures are needed

n

integer, the index of the element to see. Default is 1 (the first figure in cof() is shown). To see the other figures, change n to index the figure you want to show

rule

character, defines the rule for shading the figure

...

Other arguments

Value

An object of class figures, only the first figure is visible

Methods (by class)

Examples

# Three figures, only the first is shown
draw(shape(cof(s_lily(), square(), s_star())))

# Show the third figure (star)
draw(shape(cof(s_lily(), square(), s_star()), n = 3))

# Show the first and the second figures
 draw(shape(cof(s_lily(), square(), s_star()), n = c(1,2)))

[Package matRiks version 0.1.3 Index]