TurtleGraphics (version 1.0-8)

turtle_param: Set Display Options

Description

Sets the display options for the Turtle's trace. It is possible to change its color, line type and line width.

Usage

turtle_param(col = NULL, lwd = NULL, lty = NULL)

turtle_col(col)

turtle_lwd(lwd)

turtle_lty(lty)

Arguments

col

numeric or character; trace color, see e.g. colors and gpar.

lwd

numeric; trace line width, see gpar.

lty

numeric; trace line type, see gpar.

Details

The Turtle must be initialized prior to using this function, see turtle_init.

See Also

Other TurtleGraphics: TurtleGraphics-package, turtle_do, turtle_getpos, turtle_goto, turtle_init, turtle_move, turtle_reset, turtle_show, turtle_status, turtle_turn, turtle_up

Examples

Run this code
# NOT RUN {
turtle_init()
turtle_forward(5)
turtle_up()
turtle_forward(3)
turtle_down()
turtle_left(90)
turtle_forward(5)
turtle_param(col = "red", lwd = 2, lty = 2)
turtle_forward(5)

# }

Run the code above in your browser using DataLab