Re: [R] Error in plot.new() : figure margins too large
Dear Karly, I don't know if you've resolved your problem but I just came across the same thing in RStudio and I think I've found out what the problem is. The problem seems to occur when the plot viewing panel (by default in the bottom right) is very small. The plot function tries to create a plot within the physical space of the plot panel. If the plot panel is tiny, then the default margins of the plot may be larger than the graph/graphic itself. It is then you get the error. The simple solution is just to increase the size of the plot area in Rstudio and then try to run the code again. The plot should be created no problem. If you are still getting the issue despite doing this, let me know and I'll try and look a bit deeper into the problem! Sean -- View this message in context: http://r.789695.n4.nabble.com/Error-in-plot-new-figure-margins-too-large-tp4635651p4644364.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in plot.new() : figure margins too large
Hello All, I am running the following code in RStudio, and I keep on getting an error message that says: Error in plot.new() : figure margins too large Is there something that I am doing wrong? # Import Data nba - read.csv(http://datasets.flowingdata.com/ppg2008.csv;, sep=,) nba #Sort Data (sorting by Points, but could be sorting by any other variable) nba - nba[order(nba$PTS),] #Prepare Data: makes rows by player name instead of Row Number row.names(nba) - nba$Name #Prepare Data: don't need first column anymore, so we get rid of it nba - nba[,2:20] #Prepe Data: change data from a data frame to a data matrix nba_matrix - data.matrix(nba) #Create Heat Map nba_heatmap - heatmap(nba_matrix, Rowv=NA, Colv=NA, col = cm.colors(256), scale=column, margins=c(5,10)) Karly Harrod LBNL Summer Intern khar...@lbl.gov Lawrence Berkeley National Laboratory [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new() : figure margins too large
Your code works okay in a plan R terminal. It may be an Rstudio problem or perhaps you already have a graphics device open and are trying to draw into it? John Kane Kingston ON Canada -Original Message- From: khar...@lbl.gov Sent: Fri, 6 Jul 2012 10:39:41 -0700 To: r-help@r-project.org Subject: [R] Error in plot.new() : figure margins too large Hello All, I am running the following code in RStudio, and I keep on getting an error message that says: Error in plot.new() : figure margins too large Is there something that I am doing wrong? # Import Data nba - read.csv(http://datasets.flowingdata.com/ppg2008.csv;, sep=,) nba #Sort Data (sorting by Points, but could be sorting by any other variable) nba - nba[order(nba$PTS),] #Prepare Data: makes rows by player name instead of Row Number row.names(nba) - nba$Name #Prepare Data: don't need first column anymore, so we get rid of it nba - nba[,2:20] #Prepe Data: change data from a data frame to a data matrix nba_matrix - data.matrix(nba) #Create Heat Map nba_heatmap - heatmap(nba_matrix, Rowv=NA, Colv=NA, col = cm.colors(256), scale=column, margins=c(5,10)) Karly Harrod LBNL Summer Intern khar...@lbl.gov Lawrence Berkeley National Laboratory [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks orcas on your desktop! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new() : figure margins too large
On 06.07.2012 20:02, John Kane wrote: Your code works okay in a plan R terminal. It may be an Rstudio problem or perhaps you already have a graphics device open and are trying to draw into it? John Kane Kingston ON Canada -Original Message- From: khar...@lbl.gov Sent: Fri, 6 Jul 2012 10:39:41 -0700 To: r-help@r-project.org Subject: [R] Error in plot.new() : figure margins too large Hello All, I am running the following code in RStudio, and I keep on getting an error message that says: Error in plot.new() : figure margins too large Is there something that I am doing wrong? # Import Data nba - read.csv(http://datasets.flowingdata.com/ppg2008.csv;, sep=,) nba #Sort Data (sorting by Points, but could be sorting by any other variable) nba - nba[order(nba$PTS),] #Prepare Data: makes rows by player name instead of Row Number row.names(nba) - nba$Name #Prepare Data: don't need first column anymore, so we get rid of it nba - nba[,2:20] #Prepe Data: change data from a data frame to a data matrix nba_matrix - data.matrix(nba) #Create Heat Map nba_heatmap - heatmap(nba_matrix, Rowv=NA, Colv=NA, col = cm.colors(256), scale=column, margins=c(5,10)) Karly Harrod LBNL Summer Intern khar...@lbl.gov Lawrence Berkeley National Laboratory [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks orcas on your desktop! __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Hi, try invoking dev.off() to make RStudio open up a new graphics device with default settings. If you have made the dimensions of the plotting area very small in RStudio by dragging the bar between the left and the right area too far on the right side, the area for drawing could be indeed too small to draw a plot. if this doesn't help either, check if you have set grphical parameters to insane values (mar/mai, plt. fig/fin, oma/omd/omi, plt/pin) if you can't find out anything, post the output of par() Regards! -- GnuPG Key: 0x7340821E __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new()
My distribution is Ubuntu. xwininfo: Window id: 0x441 R Graphics: Device 2 (ACTIVE) Absolute upper-left X: 558 Absolute upper-left Y: 27 Relative upper-left X: 558 Relative upper-left Y: 27 Width: 787 Height: 744 Depth: 24 Visual Class: TrueColor Border width: 1 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: ForgetGravity Window Gravity State: NorthWestGravity Backing Store State: Always Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +558+27 --67+27 --67-27 +558-27 -geometry 787x744--67+27 plot(1:5,1:5) capabilities() jpeg png tifftcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE TRUEFALSE TRUE TRUE libxml fifo clediticonv NLS profmemcairo TRUE TRUE TRUE TRUE TRUE TRUE TRUE Warning message: Display list redraw incomplete Restarting with R --vanilla: X11(type=Xlib) plot(1:5,1:5) plot(1:5,1:5) X11(type=cairo) X11(type=cairo) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) q() Windows are opened but no plot is displayed. Any further ideas? Many thanks. Peter -- View this message in context: http://n4.nabble.com/Error-in-plot-new-tp1288878p1289769.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in plot.new()
Dear all, I have received the following error message since R 2.10.1 for the first time and I am not able to draw graphics any more: plot(1:5,1:5) plot(1:5,1:5) Error in plot.new() : figure margins too large In addition: Warning message: Display list redraw incomplete sessionInfo() R version 2.10.1 (2009-12-14) i486-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base Do you have an idea, how to solve the problem? Many thanks in advance. Peter -- View this message in context: http://n4.nabble.com/Error-in-plot-new-tp1288878p1288878.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new()
On Sun, Jan 24, 2010 at 9:15 PM, jean luc picard peter.wohlm...@gmx.at wrote: Dear all, I have received the following error message since R 2.10.1 for the first time and I am not able to draw graphics any more: plot(1:5,1:5) plot(1:5,1:5) Error in plot.new() : figure margins too large In addition: Warning message: Display list redraw incomplete sessionInfo() R version 2.10.1 (2009-12-14) i486-pc-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 [7] LC_PAPER=en_US.UTF-8 LC_NAME=C [9] LC_ADDRESS=C LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods base Do you have an idea, how to solve the problem? I have an identical system according to sessionInfo() but no problem... Are you sure you don't have a 'plot' function defined yourself that is being loaded? Run R with --vanilla from the command line: R --vanilla and see if it still fails. The '--vanilla' option stops R loading in a .RData file from the current directory. Ooh, I can duplicate your problem if I resize my plot window very small after the first plot. What do you see after your first plot(1:5,1:5)? Anything? Possibly you've got some setting that's making your graphics window very small, but I don't see why it happens on the second plot. Anyway, try --vanilla and that might cut out some possibilities. Barry -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~rowlings web: http://www.rowlingson.com/ twitter: http://twitter.com/geospacedman pics: http://www.flickr.com/photos/spacedman __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new()
Running R --vanilla plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) Error in plot.new() : figure margins too large In addition: Warning messages: 1: Display list redraw incomplete 2: Display list redraw incomplete The plot statement only opens the graphics window but no graphic is displayed (the same problem as in the original session). Peter -- View this message in context: http://n4.nabble.com/Error-in-plot-new-tp1288878p126.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new()
On Sun, Jan 24, 2010 at 9:40 PM, jean luc picard peter.wohlm...@gmx.at wrote: Running R --vanilla plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) plot(1:5,1:5) Error in plot.new() : figure margins too large In addition: Warning messages: 1: Display list redraw incomplete 2: Display list redraw incomplete The plot statement only opens the graphics window but no graphic is displayed (the same problem as in the original session). Spooky. What's your Linux distribution? Can you try this: again from R --vanilla, do plot(1:5,1:5) and then from another unix shell do a: xwininfo and click on the plot window. Paste the result back here... And while you're at it, what do you get for the output of 'capabilities()' in R: capabilities() jpeg png tifftcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE TRUEFALSE TRUE TRUE libxml fifo clediticonv NLS profmemcairo TRUE TRUE TRUE TRUE TRUE TRUE TRUE Does it happen if you do X11(type=Xlib) first to get an Xlib graphics device, then compare and contrast with X11(type=cairo) - again, restarting R from a --vanilla run every time. Barry -- blog: http://geospaced.blogspot.com/ web: http://www.maths.lancs.ac.uk/~rowlings web: http://www.rowlingson.com/ twitter: http://twitter.com/geospacedman pics: http://www.flickr.com/photos/spacedman __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error in plot.new() : figure margins too large
Hi I am getting error : Error in plot.new() : figure margins too large Can you please help -code is temp - seq(550/2, 2200, 550/2) sV2 - c(1, 1+temp[-length(temp)]) eV2 - temp i=1 bitmap(paste(c:/vidhu/poster/poster_56half_2, LETTERS[i], .png, sep = ), png256,width = 55.5, height = 8.875, res = 300) par(mfrow = c(28,1), mar = c(0.5,3,0.5,0.5), mgp = c(2,0.65,0)) for(i in 1:length(sV2)) { cat(i = , i, \n, sep = ) if (i%%2) { pSL(sV2[i], eV2[i], 5)} } dev.off() windows() [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error in plot.new() : figure margins too large
I am getting error : Error in plot.new() : figure margins too large Can you please help -code is temp - seq(550/2, 2200, 550/2) sV2 - c(1, 1+temp[-length(temp)]) eV2 - temp i=1 bitmap(paste(c:/vidhu/poster/poster_56half_2, LETTERS[i], .png, sep = ), png256,width = 55.5, height = 8.875, res = 300) par(mfrow = c(28,1), mar = c(0.5,3,0.5,0.5), mgp = c(2,0.65,0)) for(i in 1:length(sV2)) { cat(i = , i, \n, sep = ) if (i%%2) { pSL(sV2[i], eV2[i], 5)} } dev.off() windows() The error indicates that when you have drawn the margins, there is no room for the plot. I suspect that this is because your bitmap is very wide, but you are using a column for the multiframe. Try par(mfrow=c(1,28)) instead. Regards, Richie. Mathematical Sciences Unit HSL ATTENTION: This message contains privileged and confidential inform...{{dropped:20}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.