In principle, it's possible to insert a try except clause into the plot command, so that it would
try: plot(x^2,2,10) except: plot(lambda x:real(zeta(x)),2,10) There might be more efficient solutions though. On Sat, Nov 1, 2008 at 9:21 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I know about plot?. But you misread my post. I was not trying to > type Maple commands into Sage. > > I was wondering why there should be such a blatant difference > between plotting x->x^2 and plotting the zeta function on an interval > on the real axis. My point was that Maple shows this is not necessary. > > The answer for Sage is that zeta is a numeric function and x^2 is a > symbolic > expression. But why do I have to know that if I only want to make a > simple plot? > And besides I think the manual of plot does not say anything about the > distinction. > > Furthermore zeta is somehow regarded as a complex function and not so > x^2 (which of course can also be extended to the complex plane). Again > why > is there a distinction? > > I think inconsistency is an enemy of user friendlyness. > > Regards, > Michel > > > > On Nov 1, 1:24 pm, mabshoff <[EMAIL PROTECTED]> wrote: >> On Nov 1, 4:59 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >> >> >> > I want to make a simple plot for a talk. As an experiment I try >> >> > plot(x^2,2,10) (*) >> >> > and it works as expected. So happily I go for the real thing >> >> > plot(zeta(x),2,10) (**) >> >> > Unfortunately I get a long list of exceptions but no clear indication >> > what the problem is. >> >> > plot(zeta,2,10) (*) >> >> > yields an empty plot. >> >> > plot(real(zeta(x)),2,10) >> >> > gives again exceptions..... >> >> > After several tries I finally find something that works >> >> > plot(lambda x:real(zeta(x)),2,10) (**) >> >> > In retrospect I can explain why this magic incantation makes sense. >> > But I think many users will be baffled by the difference in >> > complexity between (*) and (**). In Maple there is no difference >> > between (*) and (**). >> >> > This is sage 3.0.5. Released 2008-07-11. >> >> Type plot? into a Sage session and you will see plenty of >> documentation with examples. How is one supposed to know about syntax >> otherwise? Sage is not a clone of MMA or Maple, so their syntax does >> not work. >> >> > Best regards, >> > Michel >> >> Cheers, >> >> Michael > > > --~--~---------~--~----~------------~-------~--~----~ 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-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
