powered by
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.
line.svg(x1 = NULL, y1 = NULL, x2 = NULL, y2 = NULL, stroke, stroke.width, stroke.opacity, stroke.dasharray, style.sheet = NULL)
a number, x1 coordinate information
a number, y1 corrdinate information
a number, x2 corrdiante information
a number, y2 corrdinate information
a characher, color of the line, eg. "#000000"(default), "red"
a number, stroke width of the line, default: 1
a number, stroke opacity of the line, default:1. If the stroke opacity is 0, the line is invisible
a vector, plot the dotted line, eg. c(9, 5)
a vector or a chatacter, other style of the line, eg. "stroke-linecap: round"
the characher type of SVG element
# NOT RUN { 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)) # }
Run the code above in your browser using DataLab