I'm trying to cluster time series metabolic reaction data to categorize the metabolites using DBSCAN. It's a quite larger data set with 1000 rows (time points) and 2190 variables(metabolite concentration). I'm first trying on a subset of data with 250 rows and 2190 variables. Here is the distance matrix I used for the clustering.
I'm tried to plot the cluster output of the DBSCAN. But I'm getting the bellow error.
Error in plot.new() : figure margins too large.
Then I tried using the png(). This is the code I used.
library(fpc)
dbsEUCLQ1 = dbscan(Q1Matrix,eps=0.6, MinPts = 5, method = "dist")
png(file = "Q1.png", width = 1500, height = 1000)
plot(Q1Data,col=dbsEUCLQ1$cluster)
dev.off
But still I'm not able to generate the plot. I'm getting the below error.
plot(Q1Data,col=dbsEUCLQ1$cluster) Error in plot.new() : figure margins too large dev.off function (which = dev.cur()) { if (which == 1) stop("cannot shut down device 1 (the null device)") .External(C_devoff, as.integer(which)) dev.cur() }
Am I doing something wrong here? Any help regarding this is appreciated.