On Sep 8, 4:12 pm, Sand Wraith <[EMAIL PROTECTED]> wrote:
> Hi all!
>
> I do not know - it is an bug, or my mistake. I am trying to plot sum
> of a few same functions:
>
> This is my function:
> B=10*sqrt( pi)/7;
> b=pi/7;
> c(f)=B*exp(-(b*f)^2);
> plot(c(f),(f,-5,5));
>
> in the output i see correct graphic.
>
> Then i have define a function to calculate sum:
>
> def specsum(x,Fdesc):
>     result=0;
>     for i in range(-2,3):
>         xi=i*Fdesc;
>         result+=c(x-xi);
>     return result;
>
> then plotting...
>
> p1=plot(specsum(x,5),(x,-2.5,2.5));
>
> show(p1)
>
> i see graphic, and i think its wrong, because then x -3..-1 it cross
> the X-Axis. then i thought that it is wrong axis, ...

This graphic is fine.  It's just that the horizontal axis is not at
y==0, which you can see by reading the values off of the y axis.  You
can do

sage: show(p1,ymin=0)

if you want the horizontal axis drawn at y==0.  There may be a way to
set the position of the axes origin more directly.  If not, maybe
there should be.

Regards,

JM


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