from math import *
from pylab import plot, savefig, grid
y=sin(x*pi/180)
plot(y,0,360)
grid(True)
savefig("a.png")
The result is:
Traceback (most recent call last): y=sin(x*pi/180)
NameError: name 'Integer' is not defined
======================
I assume I need to install another spkg. Which one? The sage package?
If so, should I expect it to build without having first installed a
whole bunch of other packages?
--
Kevin Horton
Ottawa, Canada
the notebook is set to Python mode by default. The above code doesn't
work for me, but it's because "x" is not defined. See the attached
screenshot.
Could you please try the sample code from the SPD front page:
http://code.google.com/p/spdproject/
? If you follow the instructions exactly, it should just work. Then
you can start to modify it for your needs.
Ondrej
Traceback (most recent call last): Integer =int
NameError: name 'Integer' is not defined
> Also, did you set the notebook to *Python* mode instead of Sage mode?
>
I left it in whichever mode it starts up in by default. The sage
preprocessor isn't working, as I need to use ** for powers, if that
tells us anything useful.
Ok, excellent. SPD doesn't contain Sage, it's just a Python and then
it contains some other libraries like numpy, scipy and sympy.
If you need the Sage functionality, you have to use the full Sage.
Ondrej