Ask Your Question

Revision history [back]

In Sage you can add separate plots to draw them on the same image; try this:

sage: f(x)=1/(x-3)
sage: p=plot(f(x),(x,-10,2.9), aspect_ratio=1)
sage: q=plot(f(x),(x,3.1,10), aspect_ratio=1)
sage: (p+q).show()

or, if you want to be a little fancy, add the asymptote:

sage: L = line2d([(3,10),(3,-10)], linestyle="dashed", color="red")
sage: (p+q+L).show()