To enlarge on what Kelvin tells you, there are some differences between executing commands at the command prompt, and executing them from a script.
If you just list the commands in the script and then load it, some "side effects" (like invoking a program to display a plot) don't happen.
One way to do what you want is to assign the results of the graphics operations to variables, and then display them after the file is loaded.
Another approach is to return one or more graphics from a procedure you define in your script. For example, if your script looked like
E=EllipticCurve("389a1")
E.plot()
then loading the script will not produce a plot. Instead, make your script look like this:
def DoIt():
E=EllipticCurve("389a1")
return E.plot()
Then the "return values" that Kelvin mentions don't get lost. With this in your script, at the sage prompt (after loading your script), use either
DoIt()
to get the plot displayed immediately, or
g = DoIt()
to save the plot for later use. If you want to deal with multiple "values" that seem to be getting lost, return them all:
return g1, g2, g3
These will be returned as a list, and you can invoke your function as
G=DoIt() # G will be the list [g1,g2,g3]
or
g1,g2,g3=DoIt()
Others on the list may be able to shed more light.
HTH
Justin
--
Justin C. Walker, Curmudgeon at Large
Director
Institute for the Enhancement of the Director's Income
-----------
Nobody knows the trouble I've been
-----------
Actually, it renders Sage "possible to use" for many people. Remember
that you can always use one of the public Sage servers or set up one of
your own -- as those work in web browsers, they'll be fine if you use
Windows.
> So is this really a matlab/etc substitute?? :( So disappointed.
Right now the Windows situation isn't so great, but we're trying to
improve that. If you know how to work with Cygwin, you could help move
the Cygwin port along.
Dan
--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------
I tend to run natively now (I use Ubuntu Linux for SAGE). If you are
stuck with Windows, you may have to increase your RAM. How much RAM are
you using?
In any case, I would recommend Linux boxes....
HTH,
A. Jorge Garcia
Applied Math and CompSci
http://shadowfaxrant.blogspot.com
http://www.youtube.com/calcpage2009
Cheers,
Simon
--
To post to this group, send email to sage-s...@googlegroups.com
To unsubscribe from this group, send email to
sage-support...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org