implicit_plot shows wrong equation at edge of plot
I'm trying to implicit_plot
a straight line, but am getting erroneous results when the line is at the edge of the plot region.
When I do
x,y = var('x y')`enter code here`
implicit_plot(y==2, (x,-0.1, 2), (y, -0.1, 2))
I get a plot with a vertical line at the right edge. (Unfortunately as a new user I can't post the image.) This is wrong since y == 2
should be a horizontal line at the top edge.
If I change the value slightly and do
implicit_plot(y==1.9), (x,-0.1, 2), (y, -0.1, 2))
I get a horizontal line near the top of the graph, as expected.
I also get correct results if I plot y==2
with ranges (x, -0.1, 2.1), (y, -0.1, 2.1)
so that the line is not exactly at the edge.
Is this a bug that I should report, or is it somehow expected behavior?
When I try this, I see "UserWarning: pathological contour plot of a function whose values all lie on one side of the sole contour; we are adding more plot points and perturbing your function values." So apparently things can go wrong when you try to plot solely on the edge of the region.