ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 16 Oct 2013 12:41:51 -0500- R graphics/plots in sagenbhttps://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/Are graphics in R on sagenb supported? I only get placeholder icons for output.Wed, 14 Sep 2011 15:43:13 -0500https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/
- Answer by kcrisman for <p>Are graphics in R on sagenb supported? I only get placeholder icons for output.</p>
https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?answer=12650#post-id-12650Short answer: yes, they are.
Long answer: it depends on the precise platform and how your R was compiled, what was on it.
- On Mac, they *should* "just work", though I've heard rumors it is not always true.
- On Linux, there are various packages you may need, and once in a while a binary is uploaded which was not compiled with them. One resource might be [this ask.sagemath.org question](http://ask.sagemath.org/question/192/compiling-r-with-png-support). [This ticket](http://trac.sagemath.org/sage_trac/ticket/8868) may also be of use.
- On the xyz.sagenb.org machines, you should be ok. I've used R graphics on them many times.
Edit: Turns out that the poster actually just needed to create a graphics device and turn it off - see [this documentation](http://sagemath.org/doc/reference/interfaces/sage/interfaces/r.html#sage.interfaces.r.R.plot), where this is implicit. Hope this helps someone!Wed, 14 Sep 2011 16:16:13 -0500https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?answer=12650#post-id-12650
- Comment by kcrisman for <p>Short answer: yes, they are.</p>
<p>Long answer: it depends on the precise platform and how your R was compiled, what was on it. </p>
<ul>
<li>On Mac, they <em>should</em> "just work", though I've heard rumors it is not always true. </li>
<li>On Linux, there are various packages you may need, and once in a while a binary is uploaded which was not compiled with them. One resource might be <a href="http://ask.sagemath.org/question/192/compiling-r-with-png-support">this ask.sagemath.org question</a>. <a href="http://trac.sagemath.org/sage_trac/ticket/8868">This ticket</a> may also be of use.</li>
<li>On the <a href="http://xyz.sagenb.org">xyz.sagenb.org</a> machines, you should be ok. I've used R graphics on them many times.</li>
</ul>
<p>Edit: Turns out that the poster actually just needed to create a graphics device and turn it off - see <a href="http://sagemath.org/doc/reference/interfaces/sage/interfaces/r.html#sage.interfaces.r.R.plot">this documentation</a>, where this is implicit. Hope this helps someone!</p>
https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=16924#post-id-16924Hah! I'm sorry, I'll add this to the answer - this is in fact in the Sage documentation, so I was thinking something much more complicated.Wed, 16 Oct 2013 12:41:51 -0500https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=16924#post-id-16924
- Comment by JosÃ© Luis for <p>Short answer: yes, they are.</p>
<p>Long answer: it depends on the precise platform and how your R was compiled, what was on it. </p>
<ul>
<li>On Mac, they <em>should</em> "just work", though I've heard rumors it is not always true. </li>
<li>On Linux, there are various packages you may need, and once in a while a binary is uploaded which was not compiled with them. One resource might be <a href="http://ask.sagemath.org/question/192/compiling-r-with-png-support">this ask.sagemath.org question</a>. <a href="http://trac.sagemath.org/sage_trac/ticket/8868">This ticket</a> may also be of use.</li>
<li>On the <a href="http://xyz.sagenb.org">xyz.sagenb.org</a> machines, you should be ok. I've used R graphics on them many times.</li>
</ul>
<p>Edit: Turns out that the poster actually just needed to create a graphics device and turn it off - see <a href="http://sagemath.org/doc/reference/interfaces/sage/interfaces/r.html#sage.interfaces.r.R.plot">this documentation</a>, where this is implicit. Hope this helps someone!</p>
https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=16925#post-id-16925I got it working. Just adding r.png() at the begining and r.dev_off() at the end of the cell.Wed, 16 Oct 2013 05:49:48 -0500https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=16925#post-id-16925
- Comment by JosÃ© Luis for <p>Short answer: yes, they are.</p>
<p>Long answer: it depends on the precise platform and how your R was compiled, what was on it. </p>
<ul>
<li>On Mac, they <em>should</em> "just work", though I've heard rumors it is not always true. </li>
<li>On Linux, there are various packages you may need, and once in a while a binary is uploaded which was not compiled with them. One resource might be <a href="http://ask.sagemath.org/question/192/compiling-r-with-png-support">this ask.sagemath.org question</a>. <a href="http://trac.sagemath.org/sage_trac/ticket/8868">This ticket</a> may also be of use.</li>
<li>On the <a href="http://xyz.sagenb.org">xyz.sagenb.org</a> machines, you should be ok. I've used R graphics on them many times.</li>
</ul>
<p>Edit: Turns out that the poster actually just needed to create a graphics device and turn it off - see <a href="http://sagemath.org/doc/reference/interfaces/sage/interfaces/r.html#sage.interfaces.r.R.plot">this documentation</a>, where this is implicit. Hope this helps someone!</p>
https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=17005#post-id-17005I got the same problem. I just followed: http://ask.sagemath.org/question/192/compiling-r-with-png-support installed all the libraries, compiled the R and r.eval('capabilities("png")') returns true, and r.eval('capabilities("X11")') returns False. When I plot something in R, I get a broken icon (I am running Sage 5.9 via ssh from a remote server).Thu, 19 Sep 2013 21:09:45 -0500https://ask.sagemath.org/question/8320/r-graphicsplots-in-sagenb/?comment=17005#post-id-17005