On Aug 21, 10:58 am, Mike Witt <[EMAIL PROTECTED]> wrote: > 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,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.
Here's one way to do what you want: on a symbolic value V, you can use V.function(x) to make sure Sage treats it as a one-argument function (even if V is a constant). So the following three commands all work: sage: parametric_plot([real(f(x,0)).function(x),imag(f(x, 0)).function(x)], -pi, pi) sage: parametric_plot([real(f(x,1)).function(x),imag(f(x, 1)).function(x)], -pi, pi) sage: parametric_plot([real(f(x,-1)).function(x),imag(f(x,-1)).function(x)], -pi, pi) Carl --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---