ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 03 Mar 2019 19:00:25 +0100False implicit plothttps://ask.sagemath.org/question/45627/false-implicit-plot/Hello
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? Sun, 03 Mar 2019 18:38:12 +0100https://ask.sagemath.org/question/45627/false-implicit-plot/Answer by vdelecroix for <p>Hello</p>
<p>I write in SAGE</p>
<p>implicit_plot(y==1/2, (-1,1),(-1,1))</p>
<p>and it returns the graph of the line x=1/2. Why? </p>
https://ask.sagemath.org/question/45627/false-implicit-plot/?answer=45628#post-id-45628Sage 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))
Sun, 03 Mar 2019 18:54:52 +0100https://ask.sagemath.org/question/45627/false-implicit-plot/?answer=45628#post-id-45628Comment by creyesm1992 for <p>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</p>
<pre><code>sage: x = var('x')
sage: y = var('y')
sage: implicit_plot(y==1/2, (x,0,1), (y,0,1))
</code></pre>
https://ask.sagemath.org/question/45627/false-implicit-plot/?comment=45630#post-id-45630thanks vdelecroix!!!Sun, 03 Mar 2019 19:00:25 +0100https://ask.sagemath.org/question/45627/false-implicit-plot/?comment=45630#post-id-45630