Learn R Programming

matRiks (version 0.1.3)

size: Sizing rule (Method)

Description

Apply a resizing to a figure

Usage

size(fig, n, rule, ...)

# S3 method for figure size(fig, n = 2, rule = "size", ...)

Value

A figure of class figure with different size.x and size.y

Arguments

fig

The figure on which the rule is applied

n

A number defining the dimension of the sizing. Default is 2.

rule

Define the sizing rule. Default is to reduce the dimension. rule = "inv" forces to increase the dimension.

...

Other arguments

Methods (by class)

  • size(figure): Resize a figure

Examples

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

# apply the default resizing to the default square
draw(size(square()))

# make the square bigger
draw(size(square(), rule = "inv"))

Run the code above in your browser using DataLab