line.svg: Generate line SVG element

Description Usage Arguments Value Examples

Description

This function will generate a line form SVG element. The <line> element is an SVG basic shape used to create a line connecting two points.

Usage

1
2
line.svg(x1 = NULL, y1 = NULL, x2 = NULL, y2 = NULL, stroke,
  stroke.width, stroke.opacity, stroke.dasharray, style.sheet = NULL)

Arguments

x1

a number, x1 coordinate information

y1

a number, y1 corrdinate information

x2

a number, x2 corrdiante information

y2

a number, y2 corrdinate information

stroke

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

stroke.width

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

stroke.opacity

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

stroke.dasharray

a vector, plot the dotted line, eg. c(9, 5)

style.sheet

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

Value

the characher type of SVG element

Examples

1
2
3
line.svg(x1 = 1, y1 = 2, x2 = 10, y2 = 20)
line.svg(x1 = 1, y1 = 2, x2 = 10, y2 = 20, stroke = "#00FF00")
line.svg(x1 = 1, y1 = 2, x2 = 10, y2 = 20, stroke.dasharray = c(9, 5))

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