#11266: Wrapper for R graphics commands.
---------------------------+------------------------------------------------
   Reporter:  JoalHeagney  |          Owner:  was                        
       Type:  enhancement  |         Status:  new                        
   Priority:  minor        |      Milestone:  sage-4.7.1                 
  Component:  interfaces   |       Keywords:  R, graphics, cairo, wrapper
Work_issues:               |       Upstream:  N/A                        
   Reviewer:               |         Author:                             
     Merged:               |   Dependencies:                             
---------------------------+------------------------------------------------

Comment(by jason):

 As a possible interim step, you could just make a context handler that
 does the .png() and .dev_off() commands, so something like this would
 work:

 {{{
 from contextlib import contextmanager

 @contextmanager
 def r_graphics(r):
     r.png()
     yield
     r.dev_off()

 with r_graphics(r):
     r.boxplot()
     r.some_other_plot()
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11266#comment:4>
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