Learn R Programming

stream (version 0.1-1)

plot: Plotting Data Stream Data and Clusterings

Description

Methods to plot data stream data and clusterings.

Usage

## S3 method for class 'DSD':
plot(x, n = 500, col= NULL, 
	    pch= NULL, ..., method="pairs")
    ## S3 method for class 'DSC':
plot(x, dsd = NULL, n = 500,
	    col_points="gray", col_clusters="red",
	    weights=TRUE, scale=c(1,5), cex=1, pch=NULL, ..., method="pairs", 
	    type = c("auto", "micro", "macro"))

Arguments

x
the DSD or DSC object to be plotted.
dsd
a DSD object to plot the data in the background.
n
number of plots taken from the dsd to plot.
col, col_points, col_clusters
colors used for plotting.
weights
the size of the symbols for micro- and macro-clusters represents its weight.
scale
range for the symbol sizes used.
cex
size factor for symbols.
pch
symbol type.
method
method used for plotting: "pairs" (pairs plot), "plot" (plot first two dimensions) or "pc" (plot first 2 principal components).
type
Plot micro- or macro-clusters. Auto used the class of dsc to decide.
...
further arguments are passed on to plot or pairs in graphics.

See Also

DSC, DSD

Examples

Run this code
dsd <- DSD_GaussianStatic(k=3)

## plot data
plot(dsd, n=500)

## create and plot micro-clusters
micro <- DSC_DenStream(initPoints=100)
cluster(micro, dsd, 500)
plot(micro)

## plot on data
plot(micro, dsd)

## create and plot macro-clusters
macro <- DSC_Kmeans(k=3)
recluster(macro, micro)
plot(macro, dsd)

Run the code above in your browser using DataLab