I'm probably trying to do something stupid here, but I'm interested
in the expression sin(a)+sin(b)+sin(c) where a,b,c are the angles of
a triangle, i.e. c=pi-a-b. This of course can be simplified to
sin(a)+sin(b)+sin(a+b).
I thought it might be interesting to plot this and so I entered:

var('a');var('b')
f=sin(a)+sin(b)+sin(a+b)
f.plot()

Sage chewed on this for a short while then came back with:



Exception (click to the left for traceback):
...
TypeError: 'float' object is unsubscriptable

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/bill/.sage/sage_notebook/worksheets/bill/4/code/12.py",
line 4, in <module>    f.plot()
  File "/sage/current/local/lib/python2.5/site-packages/sympy/
plotting/", line 1, in <module>

  File "/sage/current/local/lib/python2.5/site-packages/sage/calculus/
calculus.py", line 651, in plot
    return plot(f, *args, **kwds)
  File "/sage/current/local/lib/python2.5/site-packages/sage/plot/
plot.py", line 2387, in __call__
    G = funcs.plot(*args, **kwds)
  File "/sage/current/local/lib/python2.5/site-packages/sage/calculus/
calculus.py", line 651, in plot
    return plot(f, *args, **kwds)
  File "/sage/current/local/lib/python2.5/site-packages/sage/plot/
plot.py", line 2393, in __call__
    G = self._call(funcs, (-1, 1), *args, **kwds)
  File "/sage/current/local/lib/python2.5/site-packages/sage/plot/
plot.py", line 2472, in _call
    if abs(data[i+1][1] - data[i][1]) > max_bend:
TypeError: 'float' object is unsubscriptable

I'm a bit puzzled as to this - I assume that in order to make a plot
it has to
put some real values into a and b, but in that case I'd expect it to
work.
I'd earlier tried .plot3d() but it gave a reasonable excuse for not
doing that.

Bill
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to