Error In Png Unable To Start Device
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring unable to start png() device, ggsave developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question unable to start jpeg() device r x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; error in .external2(c_x11, paste("png::", filename, sep = ""), g$width, :unable to start device png it only takes a minute: Sign up R unable to start device PNG - capabilities() has TRUE for PNG? up vote 0 down vote favorite I am working with a R script within a wider pipeline that seems to not
No Png Support In This Version Of R
work with some versions of Rscript but with others. The call fails due to being unable to connect to X11, which is understandable because this is on a server. But my local installation of Rscript is able to handle this fine? My local installation is version 3.0.1, while the one that other users that are reporting this problem are on 3.0.2. Here is a simple test case - first the .R file: #!/usr/bin/env Rscript capabilities() png("abc") dev.off() Run with r unable to open connection to x11 display my local env: -bash-4.1$ ./test.R jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE TRUE TRUE FALSE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE TRUE FALSE TRUE TRUE FALSE TRUE null device 1 Run on the installation of Rscript others are trying to use: jpeg png tiff tcltk X11 aqua http/ftp sockets TRUE TRUE FALSE TRUE FALSE FALSE TRUE TRUE libxml fifo cledit iconv NLS profmem cairo TRUE TRUE FALSE TRUE TRUE FALSE TRUE Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png("abc") : unable to open connection to X11 display '' Execution halted r share|improve this question asked Jul 28 '14 at 16:39 Ian Fiddes 838923 add a comment| 4 Answers 4 active oldest votes up vote 6 down vote accepted In case anyone ever finds this on google, the solution is png("abc", type="cairo") share|improve this answer answered Jul 31 '14 at 16:46 Ian Fiddes 838923 Just a quick note, this didn't work for me, but i found another solution: Use the much more forgiving bitmap() function. Despite the name, it also renders flawless png's and does not need any X or similar. The reason probably has something to do with my setup; I am running RStudio Server on a headless VM. I did install X to render RGL output to a WebGL file, but
cloning? Learn how to clone a repository. Clone in SourceTree Atlassian SourceTree is a free Git and Mercurial client for Windows. Atlassian SourceTree is unable to open file for writing r a free Git and Mercurial client for Mac. young_computation Untitled project
Shiny Server Unable To Start Device Png
ROSE Pull requests Pull requests #1 Open Source Repository dyndna Branch dyndna/-suggest-fix-for-error-unable-to-start-d-1452109589398 Destination Repository young_computation Branch master
Error In Png R
### Suggest fix for error: unable to start device PNG Bitbucket cannot automatically merge this request. The commits that make up this pull request have been removed. Bitbucket cannot http://stackoverflow.com/questions/24999983/r-unable-to-start-device-png-capabilities-has-true-for-png automatically merge this request due to conflicts. Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands: git checkout master git remote add dyndna/rose https://bitbucket.org/dyndna/rose.git git fetch dyndna/rose git merge --no-ff -m 'Merged in dyndna/rose/dyndna/-suggest-fix-for-error-unable-to-start-d-1452109589398 (pull request https://bitbucket.org/young_computation/rose/pull-requests/1 #1)' remotes/dyndna/rose/dyndna/-suggest-fix-for-error-unable-to-start-d-1452109589398 Overview Commits Activity Author Samir Amin Reviewers Description Suggest fix for error: unable to start device PNG Reproduce error: On headless machines like cluster computing environment, default png command expects X11 device and throws following error: Running ROSE_main.py with required arguments gives following error: > png(filename=plotFileName,height=600,width=600) Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png(filename = plotFileName, height = 600, width = 600) : unable to open connection to X11 display '' Execution halted` Suggested fix: Replace libpng device requirement with cairo device in line 166 of file: ROSE_callSuper.R png(filename=plotFileName,height=600,width=600, type="cairo") END Learn about pull requests Comments (0) Pull request updated. Reload Blog Support Plans & pricing Documentation API Site status Version info Terms of service Privacy policy English Git 2.7.4.1.g5468f9e Mercurial 3.6.3 Django 1.7.11 Python 2.7.3 4729d131423b / 4729d131423b @ app-106 JIRA Software Confluence Bamboo SourceTree HipChat Atlassian Help Online help Learn Git Keyboard shortcuts Latest features Bitbucket tutorials Site status Support
this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Error in png: unable to start png() device I don't know if anyone is reading this, but I have more information now. I can http://r.789695.n4.nabble.com/Error-in-png-unable-to-start-png-device-td3466782.html run the same script on my other computer over and over, change the height, width and res, and it works every time. But on the faulty computer, I can open R, open the script, and run it and http://superuser.com/questions/603744/why-is-r-having-trouble-rendering-plots-to-a-png-file it works. I can re-run it any number of times and it works. However, when I change the height, width, or res settings in the function, I get the error message. From that point on, even if I change unable to the height, width, or res back to what worked before, it will no longer run and I get the error message. I can only get it to run again by shutting down the program, re-opening R and the script, and running it again. This is just bizarre to me and I have no idea why I am having this problem. Thanks if you are still reading, and I welcome any input. I'm not very technically savvy, but unable to start I am running it on Windows XP Pro Version 2002, Service Pack 3. [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code. Uwe Ligges-3 Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Error in png: unable to start png() device On 21.04.2011 22:32, Patrick McKann wrote: > I don't know if anyone is reading this, but I have more information now. I > can run the same script on my other computer over and over, change the > height, width and res, and it works every time. But on the faulty computer, > I can open R, open the script, and run it and it works. I can re-run it any > number of times and it works. However, when I change the height, width, or > res settings in the function, I get the error message. From that point on, > even if I change the height, width, or res back to what worked before, it > will no longer run and I get the error message. I can only get it to run > again by shutting down the program, re-opening R and the script, and running > it again. This is just bizarre to me and I have no
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Super User Questions Tags Users Badges Unanswered Ask Question _ Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top Why is R having trouble rendering plots to a PNG file? up vote 1 down vote favorite I am trying to get R to do some very basic plotting and such in UNIX, but am getting a weirdo error relating to X11, when as far as I can tell I'm not even needing X11. I have a matrix name d and want to save an image of a heatmap of this matrix without ever actually displaying the image (since I don't want to use X11). Here is my code: png(file="my_image.png") heatmap(d) dev.off() The problem is I am getting the following error: Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : unable to start device PNG In addition: Warning message: In png(file = "interative_hen.png") : unable to open connection to X11 display '' I don't know this is happening, since I don't see how R is needing X11, and even if it does, X11 is installed and working properly for every application I tested it with. linux unix png x11-forwarding r share|improve this question edited Jun 5 '13 at 15:14 Breakthrough 29k882128 asked Jun 4 '13 at 20:05 jake9115 1721516 Are you doing this remotely over SSH? –Breakthrough Jun 4 '13 at 20:08 Yes, I am SSHing into a cluster –jake9115 Jun 4 '13 at 20:12 I'm going to assume there's no X11 server on the cluster... If that's the case, you need to set an X11 server up on your computer, and configure your SSH client to allow X11 forwarding. This should allow you to generate the PNG files (some newsgroups mention that the X11 composter is required to render images from R). –Breakthrough Jun 4 '13 at 20:18 Thanks for the idea, but I already have an X11 server and client. From the same SSH window, I can type 'firefox' and fire up an X11 display of firefox, so I