[R] X11 plotting error
Jeffrey Horner
jeff.horner at vanderbilt.edu
Wed Aug 13 04:46:11 CEST 2008
Hmmm... the short answer is that your call to png() is requiring X11 to
generate the plot. Don't know what version you're running, but prior to
R 2.7.0, all png() calls needed access to the X server to create the
plots (on Unix). But with 2.7.0 and later, png() can be called with
type='cairo' to generate plots without X11 intervention.
If you're running an earlier version of R and you can't upgrade, then
you could install the Cairo package which supports png output without
X11 intervention.
Best,
Jeff
cls59 wrote:
> Hey everyone,
>
> I'm part of a team working at NOAA and we have developed a swan script that
> analyzes data and generates plots for the forecasters. We are ready to put
> the script on the cron and call it a summer but a technical issue has popped
> up which has us puzzled.
>
> When we run the script as an unprivileged user, it bails when png() gets
> called to open a device for the output. The error is
>
> unable to open connection to X 11 display ' ':
>
> When we run the script as root, everything works like a charm. The user has
> ownership of the plotting directories where the script drops it's output.
> The unprivileged user can run R interactively, but use of x11() or any other
> plotting commands fail.
>
> Any Linux users out there who might have any ideas on how to straighten this
> out?
>
> We are using Red Hat Enterprise 4.
>
> -Chuck
--
http://biostat.mc.vanderbilt.edu/JeffreyHorner
More information about the R-help
mailing list