make it so plotting from octave worksheets... just works
Requested by Heather Van Dyke.
I'll do this in much the same way I made plotting just work for R worksheets. The key idea is illustrate by the following:
ONE. Run this code in a new Sage Worksheet before running octave.
os.environ['GNUTERM']='svg'
def octave_plot():
_=octave.eval("print /%s/.tmp.svg"%os.path.abspath('.'))
salvus.file('.tmp.svg')
TWO. Run this code in a cell to draw an Octave plot:
%octave
clf()
x = -10:0.1:2;
plot (x, sin(x))
THREE. Now type octave_plot() in a cell to render the current octave plot!

I also want to point out how -- right now -- one can use Octave in a terminal with graphics and for editing files. These illustrate how SageMathCloud already has all the tools needed to build a standard matlab-style web-based UI around Octave -- the actual . Right now you can simulate such a thing by opening three browser windows at once.
ONE: Create a new terminal by clicking "+New --> Terminal".
TWO: Run octave like this:
GNUTERM=svg octave
THREE: create and save a plot
octave:1> fplot (@sin, [-10, 100]);
octave:2> print a.svg;
FOUR: Click files in the upper left, then click on the file "a.svg" to see the plot. When you change you it you can refresh it. You can also copy/paste the link to open it in another browser window.
FIVE: You can also edit a file such as foo.m (use +New --> "foo.m" [File]), with proper syntax highlighting, auto-indent, etc. When you want to read in the code from there to the terminal, you can source foo.m.
