Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't know if this is the answer. But notice in the documentation:

Show a mathematica expression or plot in the Sage notebook.

The code has

        P.chdir(os.path.abspath("."))
        s = 'Export["%s", %s, ImageSize->%s]'%(filename, self.name(), ImageSize)
        P.eval(s)
        P.chdir(orig_dir)

So it's doing the chdir thing inside the notebook in order to make sure the graphics file is found in the right place there, but that won't work with the command line.

You may, though, be able to evaluate a Mma command that just saves the file to some filename. It looks like that Export command might do it, but I don't have Mma, so I couldn't tell. I bet it's worth a shot, though.

You have no GUI? (So, no browser?) In that case, you may want to check if there

I don't know if this is the answer. But notice in the documentation:

Show a mathematica expression or plot in the Sage notebook.

The code has

        P.chdir(os.path.abspath("."))
        s = 'Export["%s", %s, ImageSize->%s]'%(filename, self.name(), ImageSize)
        P.eval(s)
        P.chdir(orig_dir)

So it's doing the chdir thing inside the notebook in order to make sure the graphics file is found in the right place there, but that won't work with the command line.

You may, though, be able to evaluate a Mma command that just saves the file to some filename. It looks like that Export command might do it, but I don't have Mma, so I couldn't tell. I bet it's worth a shot, though.

You have no GUI? (So, no browser?) In that case, you may want to check if there