polyline.svg {easySVG}R Documentation

Generate polyline SVG element

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

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

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



[Package easySVG version 0.1.0 Index]