iplots (version 1.1-7)

ilines: Add connected lines or polygon to the current iPlot.

Description

A generic function taking coordinates of points in data space and creating corresponding connected lines or polygon in the current iPlot.

Usage

ilines(x, y, col=NULL, fill=NULL, visible=NULL, plot = iplot.cur())

Arguments

x, y

Coordinate vectors of points to join. xy.coords is used to obtain the coordinates for plotting.

col

Drawing color of the lines. Currently only "#rrggbb" notation and named colors are supported. NULL means that color of the object is not explicitely specified.

fill

Color of the polygon area or NA if no filling should be performed.

visible

If set to FALSE the lines/polygon won't be visible initially.

plot

parent plot for the lines

Value

Resulting iObject.

Details

The point vectors x and y can contain NA values, in which case each sequence of points separated by NAs will be treated as a separate polygon. NAs must be present in both coordinates at the same index, otherwise the behavior is undefined.

See Also

ihist, ibar, iplot.list, iobj.opt

Examples

Run this code
# NOT RUN {
data(iris)
attach(iris)
iplot(Sepal.Width,Petal.Width)
l<-lowess(Sepal.Width,Petal.Width)
ilines(l)
# }

Run the code above in your browser using DataCamp Workspace