Perform the following steps to draw a bivariate cluster plot:
- Install and load the cluster package:
> install.packages("cluster") > library(cluster)
- You can then draw a bivariate cluster plot:
> clusplot(customer, fit$cluster, color=TRUE, shade=TRUE)
The bivariate clustering plot of the customer dataset
- You can also zoom into the bivariate cluster plot:
> par(mfrow= c(1,2)) > clusplot(customer, fit$cluster, color=TRUE, shade=TRUE) > rect(-0.7,-1.7, 2.2,-1.2, border = "orange", lwd=2) > clusplot(customer, fit$cluster, color = TRUE, xlim = c(-0.7,2.2),
ylim = c(-1.7,-1.2))
The zoom-in of the bivariate clustering plot