Hi Li,

        Sadly, the png and jpg devices are not really appropriate for your  
needs, since they rely on the X11 device for their operation.

        In your case, the X11 device is not necessary, although if you did  
use it as you describe, it would let the png device work.

        However, there are other ways to get png and jpg output from R which  
do not require the X11 device.

        The pdf device gives beautiful pdf output, and the imagemagick tool  
can convert pdf into png.

        The still-in-development GD device can also output png and it can do  
it faster than pdf + imagemagick, although it does not come with the  
standard R distribution - you will have to get it from CRAN, and I  
don't personally think the output is as nice, so far (although it has  
the potential to be better).

-Alex Brown

On 23 Oct 2006, at 14:29, lidaof wrote:

> Hi,
> Thank you for your reply:)
>
> i thought maybe that is because i use SSH to run R
> maybe i should run R in front of a linux server and under Genome or  
> KDE environment?
>
> i an a little confuse about that you said "examine the pdf device  
> and the convert (imagemagick) tool for best quality png  
> output.",that seems i shoud install imagemagick fisr,then use pdf()  
> to generate png picture?
>
> and forgive my pool english:)
>
> Thanks again!
>
> Li
>
> On 10/23/06, Alex Brown <[EMAIL PROTECTED]> wrote:
> Hi, Li:
>
>        Your error message + the documention to png are sufficient  
> for you
> to work out what has happened here.
>
>        Here's a clue:
>
>        your error message:
>        'unable to open connection to X11 display '' "'
>
>        ?png ...
>        'They may not be usable unless the X11 display is available  
> to the
> owner of the R process.'
>
>        If you are using an interactive R session, you should  
> examine why
> your X11 session is not available.
>
>        If you are NOT using an interactive R session, I recommend you
> examine the pdf device and the convert (imagemagick) tool for best
> quality png output.
>
> -Alex Brown
>
> On 23 Oct 2006, at 03:45, lidaof wrote:
>
> > Hi,
> >
> > i have a problem with png device
> > that is my error log
> > "> png(file="figure1.png");plot 
> (significant,type="scatter");dev.off()
> > Error in X11(paste("png::", filename, sep = ""), width, height,
> > pointsize,
> > :
> >         unable to start device PNG
> > In addition: Warning message:
> > unable to open connection to X11 display '' "
> > i searched the mailing list,someone said because no libpng installed
> > but i had installed the libpng and libpng-devel
> > and i use Fedora Core4
> > my R version is 2.4.0 and i use RPMs to install
> >
> > any solution?
> >
> > Thanks
> >
> > Li
> > --
> > DaoFeng,Li
> > Box A1053 China Agriculture University,
> > No.2 Yuanmingyuan Rd.West Haidian District
> > Beijing,100094
> > P.R.China
> > Tel:+86-10-62814726
> > Cell:+8613121987798
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch 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.
>
>
>
>
> -- 
> DaoFeng,Li
> Box A1053 China Agriculture University,
> No.2 Yuanmingyuan Rd.West Haidian District
> Beijing,100094
> P.R.China
> Tel:+86-10-62814726
> Cell:+8613121987798


        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch 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.

Reply via email to