Ask Your Question
0

Plotting in 2D

asked 2020-09-05 14:38:59 -0500

Alex89 gravatar image

updated 2020-09-05 14:42:28 -0500

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)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-09-05 15:06:16 -0500

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

edit flag offensive delete link more

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: 2020-09-05 14:38:59 -0500

Seen: 62 times

Last updated: Sep 05