canvas_segments {aRtsy} R Documentation

## Draw Segments

### Description

This function draws line segments on a canvas. The length and direction of the line segments is determined randomly.

### Usage

canvas_segments(colors, background = "#fafafa", n = 250,
p = 0.5, H = 0.1, size = 0.2)


### Arguments

 colors a string or character vector specifying the color(s) used for the artwork. background a character specifying the color used for the background. n a positive integer specifying the number of line segments to draw. p a value specifying the probability of drawing a vertical line segment. H a positive value specifying the scaling factor for the line segments. size a positive value specifying the size of the line segments.

### Value

A ggplot object containing the artwork.

### Author(s)

Koen Derks, koen-derks@hotmail.com

### See Also

colorPalette

### Examples


set.seed(1)

# Simple example
canvas_segments(colors = colorPalette("dark1"))



[Package aRtsy version 0.1.8 Index]