Ask Your Question

False implicit plot

asked 2019-03-03 18:38:12 +0200

creyesm1992 gravatar image


I write in SAGE

implicit_plot(y==1/2, (-1,1),(-1,1))

and it returns the graph of the line x=1/2. Why?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-03-03 18:54:52 +0200

vdelecroix gravatar image

Sage does not guess the names of the variables (you could have been using any name). As your expression contains a single variable, it assumes that this is the first variable (what you would call "x"). To get what you want, use the more explicit syntax

sage: x = var('x')
sage: y = var('y')
sage: implicit_plot(y==1/2, (x,0,1), (y,0,1))
edit flag offensive delete link more


thanks vdelecroix!!!

creyesm1992 gravatar imagecreyesm1992 ( 2019-03-03 19:00:25 +0200 )edit

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


Asked: 2019-03-03 18:38:12 +0200

Seen: 446 times

Last updated: Mar 03 '19