Dear all,
For some strange reason plot loses its understanding of the system
variable 'e' if I try to plot an exponential function and do
a .subs(locals()) within the plot command. The meaning of 'e' is not
modified in the name space, but its value becomes unavailable to plot
only. See below for an example. Am I doing something wrong, or is it a
bug?
Cheers
Stan
----------------------------------------------------------------------
| SAGE Version 3.1.2, Release Date: 2008-09-19 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: var('d')
d
sage: plot(exp(x-1),0,1)
sage: d=1
sage: plot(exp(x-d).subs(locals()),0,1)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/Users/sschym/<ipython console> in <module>()
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py in plot(funcs, *args, **kwds)
3561 do_show = kwds.pop('show',False)
3562 if hasattr(funcs, 'plot'):
-> 3563 G = funcs.plot(*args, **kwds)
3564 # if we are using the generic plotting method
3565 else:
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in plot(self, *args, **kwds)
952 param = A[0]
953 try:
--> 954 f = F._fast_float_(param)
955 except NotImplementedError:
956 return self.function(param)
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
4738 if vars == ():
4739 vars = self.arguments()
-> 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
4741 return self._operator(*fops)
4742
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
4738 if vars == ():
4739 vars = self.arguments()
-> 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
4741 return self._operator(*fops)
4742
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
5275 return fast_float.fast_float_constant(float(self))
5276 except TypeError:
-> 5277 raise ValueError, "free variable: %s" % self._name
5278
5279 def _recursive_sub(self, kwds):
ValueError: free variable: x
sage: plot(exp(x),0,1)
---------------------------------------------------------------------------
ValueError Traceback (most recent call
last)
/Users/sschym/<ipython console> in <module>()
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
plot/plot.py in plot(funcs, *args, **kwds)
3561 do_show = kwds.pop('show',False)
3562 if hasattr(funcs, 'plot'):
-> 3563 G = funcs.plot(*args, **kwds)
3564 # if we are using the generic plotting method
3565 else:
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in plot(self, *args, **kwds)
952 param = A[0]
953 try:
--> 954 f = F._fast_float_(param)
955 except NotImplementedError:
956 return self.function(param)
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
4738 if vars == ():
4739 vars = self.arguments()
-> 4740 fops = [op._fast_float_(*vars) for op in
self._operands]
4741 return self._operator(*fops)
4742
/Users/sschym/Programs/sage/local/lib/python2.5/site-packages/sage/
calculus/calculus.py in _fast_float_(self, *vars)
5275 return fast_float.fast_float_constant(float(self))
5276 except TypeError:
-> 5277 raise ValueError, "free variable: %s" % self._name
5278
5279 def _recursive_sub(self, kwds):
ValueError: free variable: x
--~--~---------~--~----~------------~-------~--~----~
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://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---