How to resolve "Error in plot.new() : figure margins too large" in R Studio?
Currently I am trying to do K - mean clustering on microarray dataset which consists of 127 columns and 1000 rows. When I plot the graph, it gives an error like "figure margins too large". Then, I write this in R console:
par("mar") #It will give current dimensions
par(mar=c(1,1,1,1) #Tried to update the dimensions
But; it did not work. So, can anyone suggest me another way of fixing this problem? (Attached the some part of code in below)
If x is a data.frame, plot(x) will produce a pairs plot. If x has n columns, a matrix of n x n plots will be drawn. If n is too large, the individual ploty will bee too small (smaller than the space needed already for the margins).
Check how many columns there are in x and if you really want a pairs plot. You may consider a heatmap, using RowSideColors indicating the cluster membership.
Hi Hasan, another suggestion, following @valentin and @Flavio. When you are plotting such big plots it may happen that just saving it as a pdf with default width and height parameters will produce a heatmap that has superpositions or some parts can be cut off. If you cannot modify the plot features sizes at least what you can do is customize the pdf size to be able to plot big plots and see all the features in them.
I would like to provide one solution in my special case: when I plotted a heat map of a network meta-analysis, I added "nchar.trts = 4", it helped to shorten the labels of different variables, and then it succeeded. Hope this would be helpful.
La investigación científica, comprendida como un proceso de generación de nuevos conocimientos o la comprobación de conocimientos ya desarrollados, tiene una estrecha relación con la estadística aplicada (bioestadística en salud). El propósito es mostrar esta estrecha relación entre la bioestadística y la investigación científica. Asimismo, se pres...
Overview This section describes a minimum setup requirement and step-by-step procedure to setup an environment for Affymetrix oligo microarray analysis. A sample experiment with input and output files is also described for basic steps in "microarray data analysis". You can modify the procedure to fit your own analysis; however, it may require addit...