polyline.svg: Generate polyline SVG element

Description Usage Arguments Value Examples

Description

This function can generate a polyline form SVG element The <polyline> SVG element is an SVG basic shape that creates straight lines connecting several points. Typically a polyline is used to create open shapes as the last point doesn't have to be connected to the first point. For closed shapes see the <polygon> element.

Usage

1
2
polyline.svg(points = NULL, fill, stroke, stroke.width, stroke.opacity,
  style.sheet = NULL)

Arguments

points

a matrix, a series of coordinates

fill

a character, color of the polyline, eg. "#000000"(default), "red"

stroke

a characher, color of the polyline line, eg. "#000000"(default), "red"

stroke.width

a number, stroke width of the polyline line, default: 1

stroke.opacity

a number, stroke opacity of the polyline line, default:1. If the stroke opacity is 0, the polygon line is invisible

style.sheet

a vector or a chatacter, other style of the polyline, eg. "stroke-linecap: round"

Value

the characher type of SVG element

Examples

1
2
3
points <- matrix(c(1,2,3, 11,12,13), nrow = 3, ncol = 2)
polyline.svg(points = points)
polyline.svg(points = points, stroke = "yellow")

ytdai/easySVG documentation built on May 29, 2019, 12:18 p.m.