On 23 oct, 13:46, Dag Sverre Seljebotn <da...@student.matnat.uio.no> wrote: > Vincent Delecroix wrote: > > Hi, > > > I'm working on simplestatisticexample for which I use the SAGE > > interface of theRprogram. I'm not able to plot a graphic. > > > InRwe use : > > {{{ > >R: x <- (1, 1, 1, 2, 3, 3, 4, 5, 5, 6) > >R: hist(x) > > }}} > > > I try the following in SAGE (version 4.1) : > > {{{ > > sage: x =r("c(1, 1, 1, 2, 3, 3, 4, 5, 5, 6)") > > sage:r.hist(x) > > ... > > }} > > > The last command returns a strange objects, which does not plot > > anything ! In the documentation string of ther.hist object, it is > > asked to set a plot parameter to TRUE (in upper case, which is theR > > syntax). I tried the following without success : > > {{{ > > sage:r.hist(x, plot=True) > > ... > > }}} > > > Does anybody know how to use graphic functions fromR? > > You probably need to set up a graphics device. Try e.g > > r.png('testfile.png') > # then plot > # then:r.dev_off() > > Dag Sverre
Thank you Dag for the answer. Unfortunately, I get {{{ sage: r.png("tmpfile.png") Traceback (click to the left for traceback) ... RuntimeError: R was not compiled with PNG support }}} I found no help on compilation of R with png support, does any body have a solution ? --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to sage-support-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-support URL: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---