Skip to content
This repository was archived by the owner on Apr 16, 2018. It is now read-only.
This repository was archived by the owner on Apr 16, 2018. It is now read-only.

make it so plotting from octave worksheets... just works #97

@williamstein

Description

@williamstein

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!

screen shot 2014-02-13 at 9 13 56 am

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions