First of all "A Happy New Year to everyone!"
Ok, sage-2.9.1-linux-ubuntu-32bit-i686-Linux on Ubuntu 7.10 machine I
get a plot for this:
sage: maxima.plot2d('[-7.5/-0.5*(x-0.5)+8,-7.5/7.5*(x-0.5)+8]','[x,
0,8]', '[y, 0, 8],[ylabel,"y"],[gnuplot_preamble, "set grid xtics
ytics"],[legend,false]')
But not for this ugliness:
sage: maxima.plot2d('[-7.5/-0.5*(x-0.5)+8, -7.5/7.5*(x-0.5)+8,
-6.5/-0.5*(x-0.5)+8, -6.5/7.5*(x-0.5)+8, -5.5/-0.5*(x-0.5)+8,
-5.5/7.5*(x-0.5)+8, -4.5/-0.5*(x-0.5)+8, -4.5/7.5*(x-0.5)+8,
-3.5/-0.5*(x-0.5)+8, -3.5/7.5*(x-0.5)+8, -2.5/-0.5*(x-0.5)+8,
-2.5/7.5*(x-0.5)+8, -1.5/-0.5*(x-0.5)+8, -1.5/7.5*(x-0.5)+8,
-0.5/-0.5*(x-0.5)+8, -0.5/7.5*(x-0.5)+8]','[x,0,8]', '[y, 0, 8],
[ylabel,"y"], [gnuplot_preamble, "set grid xtics ytics"],
[legend,false]')
or this
sage: maxima('plot2d([-7.5/-0.5*(x-0.5)+8, -7.5/7.5*(x-0.5)+8,
-6.5/-0.5*(x-0.5)+8, -6.5/7.5*(x-0.5)+8, -5.5/-0.5*(x-0.5)+8,
-5.5/7.5*(x-0.5)+8, -4.5/-0.5*(x-0.5)+8, -4.5/7.5*(x-0.5)+8,
-3.5/-0.5*(x-0.5)+8, -3.5/7.5*(x-0.5)+8, -2.5/-0.5*(x-0.5)+8,
-2.5/7.5*(x-0.5)+8, -1.5/-0.5*(x-0.5)+8, -1.5/7.5*(x-0.5)+8,
-0.5/-0.5*(x-0.5)+8, -0.5/7.5*(x-0.5)+8]','[x,0,8]', '[y, 0, 8],
[ylabel,"y"], [gnuplot_preamble, "set grid xtics ytics"],
[legend,false])')
which returns:
sage0
but no plot.
But in maxima plot2d(...) works, also in maxima.console()
Octave is different; it pops a gnuplot window with some lines and
raise the following error:
sage: octave('fplot("[-7.5/-0.5*(x-0.5)+8, -7.5/7.5*(x-0.5)+8,
-6.5/-0.5*(x-0.5)+8, -6.5/7.5*(x-0.5)+8, -5.5/-0.5*(x-0.5)+8,
-5.5/7.5*(x-0.5)+8, -4.5/-0.5*(x-0.5)+8, -4.5/7.5*(x-0.5)+8,
-3.5/-0.5*(x-0.5)+8, -3.5/7.5*(x-0.5)+8, -2.5/-0.5*(x-0.5)+8,
-2.5/7.5*(x-0.5)+8, -1.5/-0.5*(x-0.5)+8, -1.5/7.5*(x-0.5)+8,
-0.5/-0.5*(x-0.5)+8, -0.5/7.5*(x-0.5)+8]",[0,8])')
---------------------------------------------------------------------------
<type 'exceptions.TypeError'> Traceback (most recent call
last)
/home/lwdrob/Disertatie/<ipython console> in <module>()
/usr/local/sage/local/lib/python2.5/site-packages/sage/interfaces/
expect.py in __call__(self, x)
736 return x
737 if isinstance(x, basestring):
--> 738 return cls(self, x)
739 try:
740 return self._coerce_from_special_method(x)
/usr/local/sage/local/lib/python2.5/site-packages/sage/interfaces/
expect.py in __init__(self, parent, value, is_name)
987 except (TypeError, KeyboardInterrupt,
RuntimeError, ValueError), x:
988 self._session_number = -1
--> 989 raise TypeError, x
990 self._session_number = parent._session_number
991
<type 'exceptions.TypeError'>: Error executing code in Octave
CODE:
sage4=fplot("[-7.5/-0.5*(x-0.5)+8,-7.5/7.5*(x-0.5)+8,-6.5/-0.5*(x-0.5)+8,-6.5/7.5*(x-0.5)+8,-5.5/-0.5*(x-0.5)+8,-5.5/7.5*(x-0.5)+8,-4.5/-0.5*(x-0.5)+8,-4.5/7.5*(x-0.5)+8,-3.5/-0.5*(x-0.5)+8,-3.5/7.5*(x-0.5)+8,-2.5/-0.5*(x-0.5)+8,-2.5/7.5*(x-0.5)+8,-1.5/-0.5*(x-0.5)+8,-1.5/7.5*(x-0.5)+8,-0.5/-0.5*(x-0.5)+8,-0.5/7.5*(x-0.5)+8]",
[0,8]);
Octave ERROR:
error: value on right hand side of assignment is undefined
error: evaluating assignment expression near line 1, column 6
error: near line 1 of file `/home/lwdrob/.sage//temp/lwdrob_comp/7546//
interface//tmp'
error: source: error sourcing file `/home/lwdrob/.sage//temp/
lwdrob_comp/7546//interface//tmp'
But in octave and octave.console() in works.
Any ideas are welcomed.
Best regards,
lwd.
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---