I have a 300x2 matrix of data, i.e. 300 observations of 2 variables. Using the kmeans function in R, I can plot the resulting clusters in the following way:
data <- scale(data)
fit.kmeans <- kmeans(data, 3)
plot(data, col = fit.kmeans$cluster)
This gives a nice 2D plot of the original data, colored by cluster. Is there any simple way of doing the same using the hclust function? Or, alternatively, is there another function which lets me implement different clustering methods and subsequently plot the resulting clusters? Thanks in advance.

