Ask Your Question
1

Plotting in 2D

asked 4 years ago

Alex89 gravatar image

updated 4 years ago

I have a question about the plots made by SageMath compared to other CAS.

Why does it make the straight line between the two curves? It's like Sage is plotting the vertical asymptote without the user asking for it.

It does this to all the functions in the form of 1/x. I have not seen this type of plotting in Mathematica or Desmos, which made me wonder why the difference. Thanks.

sage: f(x) = x^2/(x+1)
sage: plot(f, (x,-3,2),figsize=10, ymax=8,ymin=-8)

or

sage: plot(1/(x+1), (x,-3,2),figsize=10, ymax=8,ymin=-8)
Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 4 years ago

Emmanuel Charpentier gravatar image

Try:

plot(1/(x+1), (x,-3,2),figsize=10, ymax=8,ymin=-8, detect_poles="True")

or (more informative) :

plot(1/(x+1), (x,-3,2),figsize=10, ymax=8,ymin=-8, detect_poles="show")

plot? is your friend...

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 4 years ago

Seen: 891 times

Last updated: Sep 05 '20