Not wanting to suggest I am the expert on this,
I would conjecture that splitting the plot in two parts
is the right way to do it. The reason why I think that is
because it seems reasonable to me that plot cleverly
concatenates lots of line plots. If true, it is the interpolation of
the point (-1,f(-1 - 0)) and (-1,f(-1 + 0)) which creates the
vertical line.


Another method should be to create a 2 part piecewise-defined
function (equal to f on (-4,-1) and on (-1,4)) and plot that.
However, there seem to be some bugs in the plotting procedure of piecewise
defined functions, so that won't work until I get time to fix
the bugs.

On 2/10/07, Joel B. Mohler <[EMAIL PROTECTED]> wrote:
>
> On Saturday 10 February 2007 10:20, David Joyner wrote:
> > Is this what you want?
> >
> > sage: f = lambda x:1/x
> > sage: p = plot(f(x),-4,4)
> > sage: show(p,xmin=-4,xmax=4,ymin=-4,ymax=4)
>
> Hmm, now I feel stupid ... I shouldn't have read the documentation.  Neither
> the "show??" or "plot??" documentation are very clear on that (or a whole
> bunch of other things).
>
> Thanks.
>
> And another plotting question:
> sage: f = lambda x:1/(x+1)
> sage: p=plot(f,-4,4)
> sage: show(p,xmin=-4,xmax=4,ymin=-4,ymax=4)
> produces a vertical line at x=-1 for the discontinuity.  Is there a way to
> suppress that?  After reading the reference manual, I see that I could add a
> plot to the left of -1 to a plot to the right of -1.  Is there a better way?
>
> --
> Joel
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to