Error In X11 Paste Png
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 x11 is not available r Learn more about Stack Overflow the company Business Learn more about hiring developers
Unable To Open Connection To X11 Display R
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack capabilities x11 false Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up How to run R scripts on servers without error in .external2 c_x11 paste png filename sep g width X11 up vote 10 down vote favorite 3 I want to run R scripts and save the plots using png(). X11 is not supported on the Unix servers and I get the following error message: Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : unable to start device PNG Calls: png In addition: Warning message: In png("test.png", width = 900, height = 400) : unable
R Enable X11
to open connection to X11 display '' Execution halted Setting environment variables Sys.setenv("DISPLAY"=":0.0") or Sys.setenv("DISPLAY"=":0") in the R scripts didn't solve the problem. This code example produces the error above: library(ggplot2) library(grid) # Some data df = data.frame(x = c(1.2,5,3,5.3,2,9,4,6,8,0), y = c(1.5,6,2.5,5.1,2.3,8.7,4.1,6,8,0)) # Base plot p <- ggplot(df, aes(x,y)) + geom_point() + scale_x_continuous(limits = c(0, 8), expand = c(0,0)) + scale_y_continuous(limits = c(0, 8), expand = c(0,0)) + geom_smooth(method="lm", se=FALSE, formula=y~x, aes(colour="2"), show_guide=TRUE, fill=NA, size=1.2) + geom_vline(xintercept = 3) + geom_vline(xintercept = 7) + opts(plot.margin = unit(c(1,1,4,1), "lines")) # Create the text Grobs Text1 = textGrob("Part 1") Text2 = textGrob("Part 2") Text3 = textGrob("Part 3") # Add the annotations # Segment 1 p1 = p + annotation_custom(grob = linesGrob(), xmin = 0, xmax = 0, ymin = -1, ymax = -.75) + annotation_custom(grob = linesGrob(), xmin = 0, xmax = 3, ymin = -1, ymax = -1) + annotation_custom(grob = linesGrob(), xmin = 3, xmax = 3, ymin = -1, ymax = -.75) + annotation_custom(grob = Text1, xmin = 0, xmax = 3, ymin = -1.25, ymax = -1.25) # Segment 2 p1 = p1 + annotation_custom(grob = linesGrob(), xmin = 3, xmax = 7, ymin = -1
Next message: [R] Error in X11(paste("png::", filename,
Compile R With X11 Support
sep = ""), width, height, pointsize unable to start device PNG Messages sorted by: [ http://stackoverflow.com/questions/13067751/how-to-run-r-scripts-on-servers-without-x11 date ] [ thread ] [ subject ] [ author ] Hi, I got this error while using png() function in RedHat 9.0. "Error in X11(paste("png::", filename, sep = ""), https://stat.ethz.ch/pipermail/r-help/2005-December/085173.html width, height, pointsize unable to start device PNG" It looks like the system lacks some library for graphics. Can anyone tell me which rpm I should install to have png() function work with out problem? Thanks ... Previous message: [R] How extract the names of ID in SpatialPolygons object Next message: [R] Error in X11(paste("png::", filename, sep = ""), width, height, pointsize unable to start device PNG Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] More information about the R-help mailing list
• rss Community Log In Sign Up Add New Post Question: Making PNG figures from plots https://biostar.usegalaxy.org/p/9170/ in R from toolshed (without X11) 0 2.0 years ago by https://github.com/ipython/ipython/issues/5329 y.hoogstrate • 270 Netherlands y.hoogstrate • 270 wrote: Hi everyone, I'm encountering problems when I want to export a plot from R into a PNG, using several R packages from the toolshed(s). This problem is probably related to the following issue: http://dev.list.galaxyproject.org/package-r-xx-problem-X11-is-not-available-td4663344.html error in Therefore, I'm using the package: http://testtoolshed.g2.bx.psu.edu/view/iuc/package_r_3_0_2 When I run R code of the following structure: png(output_PValue_distribution_plot) plot(x_var,y_var) dev.off() R crashes with the following error: Error in .External2(C_X11, paste("png::", filename, sep = ""), g$width, : unable to start device PNG Calls: png In addition: Warning message: In png(output_PValue_distribution_plot) : unable to open connection to x11 paste png X11 display '' Execution halted How I interpret this is that in order to produce PNG's, R needs to be compiled with the X11 library. Because the installer from the toolshed uses the compilation argument " --without-x", it doesn't compile with X11 and so it is not possible to produce PNGs, correct? I also tried another solution; installation of R with X from the following repository: https://testtoolshed.g2.bx.psu.edu/repository?repository_id=5f7d83aa4f577607 . However, the repository requires several other dependencies which are not programmed within the installer: libx11-dev libxt-dev (and some more, because after all it still work out). So, what would be the best way to create a PNG figure from my plot(s) within an R instance from a toolshed? Does it require R to be compiled with X11 or are there ways to overcome this (I am not sure but I thought I read something about Cairo)? Or would somebody recommend to use a non-R program to convert from e.g. PDF/SV
Sign in Pricing Blog Support Search GitHub This repository Watch 778 Star 10,269 Fork 3,022 ipython/ipython Code Issues 1,001 Pull requests 10 Projects 0 Wiki Pulse Graphs New issue rmagic png call with no x11 display #5329 Closed jseabold opened this Issue Mar 11, 2014 · 5 comments Projects None yet Labels None yet Milestone no action Assignees No one assigned 6 participants jseabold commented Mar 11, 2014 We (statsmodels) are building our docs, including running our notebooks, in a cronjob that doesn't have an x11 display. Matplotlib stuff is all handled, but there's this png call in the rmagic extension that's throwing an error for us. I can work around it, but I'm kind of curious why this is being called for code that doesn't produce any plots. Notebook: http://statsmodels.sourceforge.net/devel/examples/notebooks/generated/robust_models_1.html Full traceback: %load_ext rmagic %R library(robustbase) %Rpush yy xx %R mod <- lmrob(yy ~ xx); %R params <- mod$coefficients; %Rpull params Error in X11(paste("png::", filename, sep = ""), g$width, g$height, pointsize, : unable to start device PNG In addition: Warning message: In png("/tmp/tmpiRnqij/Rplots%03d.png", ) : unable to open connection to X11 display '' --------------------------------------------------------------------------- RRuntimeError Traceback (most recent call last)