0

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.

Has QUIT--Anony-Mousse
  • 76,138
  • 12
  • 138
  • 194
SriniShine
  • 1,089
  • 5
  • 26
  • 46
  • try reading this for your answer http://stackoverflow.com/questions/12766166/error-in-plot-new-figure-margins-too-large-in-r/17220137#17220137 – Ajay Ohri Jul 19 '15 at 12:01

1 Answers1

0

Here is a relevant answer from a very similar question:

I had this error when I was trying to plot high dimensional data. If that's what is going on with you, try multidimensional scaling: http://www.statmethods.net/advstats/mds.html

https://stackoverflow.com/a/17220137/338303

Community
  • 1
  • 1
hoffmanc
  • 614
  • 9
  • 16