#7665: Make support for R graphics
------------------------+---------------------------------------------------
   Reporter:  kcrisman  |       Owner:  was                          
       Type:  defect    |      Status:  new                          
   Priority:  major     |   Milestone:  sage-4.3.3                   
  Component:  graphics  |    Keywords:  plot, R, graphics, statistics
     Author:            |    Upstream:  N/A                          
   Reviewer:            |      Merged:                               
Work_issues:            |  
------------------------+---------------------------------------------------

Comment(by kcrisman):

 Okay, I have dug into this, and here are some preliminary thoughts.

 We have a function r.png, which only works if capabilities('png') returns
 TRUE.  In the default build on Mac, we get
 {{{
 > capabilities()
     jpeg      png     tiff    tcltk      X11     aqua http/ftp  sockets
    FALSE    FALSE    FALSE     TRUE    FALSE    FALSE     TRUE     TRUE
   libxml     fifo   cledit    iconv      NLS  profmem    cairo
     TRUE     TRUE     TRUE     TRUE     TRUE    FALSE    FALSE
 }}}
 However, to build with X11 (which would enable png and friends) or with
 aqua on Mac (which would enable the quartz graphics device), we need to
 build with certain options.  See [http://CRAN.R-project.org/bin/macosx
 /RMacOSX-FAQ.html] and [http://cran.r-project.org/doc/manuals/R-admin.html
 #Configuration-options] for some info.

 On sagenb.org, however, we do have png and Cairo TRUE, though X11 FALSE.
 The commands that give various errors on my computer in the description
 instead give the actual data set (!) on sagenb, except the last one which
 still returns NULL.  However, the following DOES work (from the
 documentation in interfaces/r.py):
 {{{
 r.png('temp.png')
 x = r([1,2,3])
 y = r([4,5,6])
 r.plot(x,y)
 r.dev_off()
 }}}
 So it seems that one can do this, but it's annoying.  Similarly:
 {{{
 r.png('temp2.png')
 r.plot('MPG.highway ~ Weight', data='Cars93')
 r.dev_off()
 }}}
 works on sagenb.  It's very nice, in fact!

 So presumably if we enabled X11 on Mac (perhaps on a case-by-case basis
 for each version of OSX as in the above websites) we would get this at
 least, and perhaps also enabling aqua would solve this on Mac.  To be
 continued...

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7665#comment:2>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to