This is an attempt to ask my previous question more clearly :-)

I'm looking for a work-around for the situation where I would normally
call parametric_plot (or plot, for that matter) with a function, and in
some particular case that function turns out to evaluate to a constant.

For example:

sage: def f(a,b): return e^(a+b*I)
....:
sage: parametric_plot([real(f(x,1)),imag(f(x,1))], -pi, pi)

  Works as expected

sage: parametric_plot([real(f(x,-1)),imag(f(x,-1))], -pi, pi)

  Works as expected

sage: parametric_plot([real(f(x,0)),imag(f(x,0))], -pi, pi)

  Gives a page full of errors, which I interpret to mean that there
  was a problem plotting because imag(f(x,0)) evaluates to a constant.

I believe that this is the same issue described in:

http://trac.sagemath.org/sage_trac/ticket/2410

But I'm not sure. I notice that:

sage: type(imag(f(x,1)))
<class 'sage.calculus.calculus.SymbolicArithmetic'>

and:

sage: type(imag(f(x,0)))
<class 'sage.calculus.calculus.SymbolicConstant'>

So, perhaps I could use this test (at least in this particular case) to
avoid calling parametric_plot and simply draw a line instead. But
I wonder if there is a more general strategy. For example, a single
test that will tell if a function if going to evaluate to any kind
of "constant" that plot or parametric_plot will have a problem with?

I'm trying to be as clear as I can about this. I'm very new to Sage,
and I realize that I could be missing something obvious.

-Mike


--~--~---------~--~----~------------~-------~--~----~
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