True, but I'd like something a little more ... pythonic. 

I was thinking of a wrapper that acts like the following:

graph = Rgraphic(arguments passed to R.Cairo)
graph.boxplot(arguments)
graph.histogram(arguments)
graph.etc......
show(graph)

All method calls that aren't defined in the Rgraphic class could be stored 
in a list inside the instance.
The .__show__() method initialises the R.Cairo object, runs all the 
non-class calls from the list in R, then closes the R.Cairo object, with the 
possibility of storing the returned image.
If the image is stored, the next time .__show__() is called, the image can 
be returned immediately, as long as no additional graph. R methods have been 
called.
Otherwise the R.Cairo object can be reinitialised, etc.

-- 
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-support
URL: http://www.sagemath.org

Reply via email to