pplot_tree {lazy.cluster}R Documentation

Profile Plot of the Observations in Each Cluster

Description

Profile Plot of the Observations in Each Cluster

Usage

pplot_tree(data = NULL, tree = NULL, ncl = 2, title = NULL, x = NULL,
  xaxp = NULL, xlim = NULL, ylim = NULL, xlab = NULL, ylab = NULL,
  lwd = 2, pch = c(1:9, 0, letters[1:26], LETTERS[1:26]), lty = 1:5,
  col = 1:8, legend = "bottomleft")

Arguments

data

Data frame

tree

An class hclust object

ncl

A vector of the number of clusters

title

A title string to be printed at the top of the plot.

x

A vector of size ncol(data) specifying the horizontal location.

xaxp

x tick mark locations of the form c( from, to, # of intervals)

xlim

Horizontal axis spec: of the form c( min, max ) : Default is c(1,ncl)

ylim

Vertical axis spec: of the form c( min, max )

xlab

Horizontal axis label

lwd

Vector of the width of the lines

pch

Vector of the symbols in the lines

lty

Vector of the types of the lines

col

Vector of the colors of the lines

legend

The location of the legend or NULL.

ykab

Vertical axis label

Details

This function creats, for each of ncl clusters, profile plot of the observations in each of cluster.

When legend overlapps the plot, try legend="topleft". Or, use legend="" and add legend manually by controlling ylim parameter.

Examples


Y <- demodata[,1:8]
set.seed(1701)
resY2 <- hclust( dist(Y) )
pplot_tree( Y, resY2, 3, title="Main Result", ylim=c(-2,10) )
resY3 <- dhclust( Y, maxclustersize=3 )
pplot_tree( Y, resY3$tree_l, 3, title="from Large", ylim=c(-2,10) )
pplot_tree( Y, resY3$tree_s, 3, title="from Short", ylim=c(-2,10) )


[Package lazy.cluster version 0.1.4 Index]