>From Dave:
> I've not been following this, but note that there are virtual X displays which
> appear to accept graphics, but in fact throw it to /dev/null. Xvfb is one I
> know
> of - there may be others.
Yes, the R Devel list mentioned this as well, but I don't think we can
assume this is on most machines building Sage, and getting it to work
was not just a trivial thing.
>From Joal:
> I'm not actually sure if the r.png( ) in the system I have set up uses the
> system png libraries or cairo, but having the tcl/tk R package installer is
> handy.
>
> What I'd like to see in sage is a rewrite of the r.png( ) functionality
> Currently, to include a R graphic object in the sage notebook, the only way
> to get it to work is:
>
> r.png('filename.png')
> <r graphical operations such as boxplot, histogram, etc.>
> r.dev_off()
To be fair, this is basically how it works in straight-up R, isn't
it? I mean without any of the front-ends. Don't you have to
initialize a graphics device and then turn it off to "get" the image?
We aren't trying to do anything fancy yet.
Also, you shouldn't have to use a filename. r.png() by itself should
work, and does for me.
> This is especially frustrating as the produced filename doesn't appear in
> the sage notebook data directory. :(
The file should live in the correct directory; I thought that was
fixed some time ago. Graphics only appear if they live in the given
cell's directory, iirc. It is true they won't be in the DATA
directory, but I don't think anything lives there unless you tell it
to.
Here is what happens. Somehow it first is given a temp name
like .Rplot001.png-0TJi, which shows up as a link, and then you click
on the link and nothing useful happens. But then I go to
cd .sage/sage_notebook.sagenb/home/admin/106/cells/38/
(or whatever cell you are in) and I see
ls
Rplot001.png
and that is a normal plot. So somehow the temp name is funky when
displayed. This is now http://trac.sagemath.org/sage_trac/ticket/11249.
--
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