Learn R Programming

matRiks (version 0.1.3)

shade: Shade rule (Method)

Description

Apply a change in the shading of the figure

Usage

shade(fig, n, rule, ...)

# S3 method for figure shade(fig, n = 1, rule = "shade", ...)

Value

An object of class figure with different shading characteristics

An object of class figure with different shading characteristics

Arguments

fig

The figure on which the rule is applied

n

integer, defines the color of the shading. Default is 1 (white). Other options are 2 (grey) and 3 (black)

rule

character, defines the rule for shading the figure

...

Other arguments

Methods (by class)

  • shade(figure): Change the shade of a figure

    Apply a change in the shading of the figure

Examples

Run this code
# draw default triangle
draw(triangle())

# make it grey
draw(shade(triangle(), 2))
# draw default triangle
draw(triangle())

# make it grey
draw(shade(triangle(), 2))

Run the code above in your browser using DataLab