1 | initial version |
plot(lambda u:1, (-2, 2))
plots an horizontal line where y
is constant (i. e. $y=1$).
Do you want a vertical line, where the same value of x
of x
corresponds to (infinitely) many values of y
? This by definition cannot be the representation of a function of x
.
You can use a parametric representation of such a vertical line ; for example, parametric_plot([1,lambda u:u],(0,2))
will plot the vertical segment from (1,0)
to (1,2)
.
You can also directly use the primitive line
: line([(1,0),(1,2)])
will get the same result as before.
There are probably other ways, whose search is left to you as an exercise...