Hi I am using R 2.2.1 under Linux (SuSE 10) and would like to know if it is possible to create graphs, i.e. jpeg(filename=fn) try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, show.given=FALSE) ) dev.off() from a text console? It gives me an error message on the jpeg() command: Error in X11(..snip..) unable to start device jpeg In addition: warning message: unable to open connection to X11 display. Are there any ways to create the plot and save it into a jpeg file from a text console? Thanks, Rainer -- -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa Tel: +27 - (0)72 808 2975 (w) Fax: +27 - (0)21 808 3304 Cell: +27 - (0)83 9479 042 email: RKrug at sun.ac.za Rainer at krugs.de
Rainer M Krug wrote:> Hi > > I am using R 2.2.1 under Linux (SuSE 10) and would like to know if it is > possible to create graphs, i.e. > > jpeg(filename=fn) > try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, show.given=FALSE) ) > dev.off() > > from a text console? > It gives me an error message on the jpeg() command: > > Error in X11(..snip..) unable to start device jpeg > In addition: warning message: > unable to open connection to X11 display. > > Are there any ways to create the plot and save it into a jpeg file from > a text console?Via bitmap() (i.e. postscript with ghostscript postprocessing). Uwe Ligges> Thanks, > > Rainer > > >
Also check out the GDD package created by Simon Urbanek if bitmap does not fit your needs. On some systems, bitmap is slow or produces an inferior quality plot, in part because anti-aliasing is not supported (at least on my system). GDD, however, produces excellent anti-aliased graphs using the GD Graphics Library with Freetype support instead of ghostscript. That said, GDD is still in beta and has a couple of missing features, such as lack of support for different line widths in graphs (as of 0.1-7). --Robert -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Uwe Ligges Sent: Thursday, March 23, 2006 11:11 AM To: rkrug at sun.ac.za Cc: R help list Subject: Re: [R] Create graphs from text console Rainer M Krug wrote:> Hi > > I am using R 2.2.1 under Linux (SuSE 10) and would like to know if itis> possible to create graphs, i.e. > > jpeg(filename=fn) > try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr,show.given=FALSE) )> dev.off() > > from a text console? > It gives me an error message on the jpeg() command: > > Error in X11(..snip..) unable to start device jpeg > In addition: warning message: > unable to open connection to X11 display. > > Are there any ways to create the plot and save it into a jpeg filefrom> a text console?Via bitmap() (i.e. postscript with ghostscript postprocessing). Uwe Ligges> Thanks, > > Rainer > > >______________________________________________ R-help at stat.math.ethz.ch mailing list stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! R-project.org/posting-guide.html
From: Uwe Ligges> > Rainer M Krug wrote: > > > Hi > > > > I am using R 2.2.1 under Linux (SuSE 10) and would like to > know if it > > is > > possible to create graphs, i.e. > > > > jpeg(filename=fn) > > try( coplot( mor$I_Morisita ~ mor$Year | mor$RunStr, > > show.given=FALSE) ) > > dev.off() > > > > from a text console? > > It gives me an error message on the jpeg() command: > > > > Error in X11(..snip..) unable to start device jpeg > > In addition: warning message: > > unable to open connection to X11 display. > > > > Are there any ways to create the plot and save it into a jpeg file > > from > > a text console? > > > Via bitmap() (i.e. postscript with ghostscript postprocessing).Or alternatively, look in the list archive about using xvfb; e.g., finzi.psych.upenn.edu/R/Rhelp02a/archive/63018.html Andy> Uwe Ligges > > > > Thanks, > > > > Rainer > > > > > > > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > R-project.org/posting-guide.html > >
Thanks a lot for all your help and tips. As I don't need publishhable quality, I will go with the bitmap option. Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology University of Stellenbosch Matieland 7602 South Africa Tel: +27 - (0)72 808 2975 (w) Fax: +27 - (0)21 808 3304 Cell: +27 - (0)83 9479 042 email: RKrug at sun.ac.za Rainer at krugs.de