How to plot a R graph directly in Sage

asked 2013-10-28 17:14:47 -0600

updated 2013-10-28 17:39:46 -0600

Shashank gravatar image

I want to plot the graph using r language in Sage. And when I put this code:

sage: png(file="myplot.png", bg="transparent")
sage: plot(1:10)
sage: rect(1, 5, 3, 7, col="white")

It works, but I have to click to see the graph in a new page. What I want is to see the graph directly without clicking.

edit retag flag offensive close merge delete


Can you give us a little more detail about your setup (platform, Sage version) as well as whether you are using command line or notebook? Note that your code shouldn't actually work: you would have to be in the notebook with the %r mode selected, but then the `sage:` part should (?) confuse it...

kcrisman gravatar imagekcrisman ( 2013-10-30 02:50:57 -0600 )edit