Here is a minimal example (implicit_plot does this, essentially):

sage: contour_plot(x/y==0,(x,-1,1),(y,-1,1), plot_points=150,
contours=(0,0), fill=False, cmap=["blue"])

So the real question is why p *doesn't* have the 'wrong' line!

sage: C = contour_plot(x/y==0,(x,-1,1),(y,-1,1),plot_points=4,
contours=(0,0), fill=False, cmap=["blue"])
sage: c = C[0]
sage: c.xy_data_array
[[1.0, 0.33333333333333337, -0.33333333333333326, -1.0],
[2.9999999999999996, 1.0, -0.99999999999999967, -2.9999999999999996],
[-3.0000000000000009, -1.0000000000000004, 1.0, 3.0000000000000009],
[-1.0, -0.33333333333333337, 0.33333333333333326, 1.0]]

And looking at the code for ContourPlot, this is somehow happening in
matplotlib.

        else:
            CS = subplot.contour(self.xy_data_array, contours,
cmap=cmap, extent=(x0,x1,y0,y1),
                            linewidths=linewidths,
linestyles=linestyles, label=options['legend_label'])


A mpl expert will have to take the story from here, but I suspect that
our use of subplot.contour is causing problems here - the
'contours=(0,0)' or something.  Hope someone else chimes in!

- kcrisman

On Jan 18, 6:36 pm, adrian <[email protected]> wrote:
> In the following I expected the line $y=x$ in red for q;  and the line
> $y=-x$ in yellow for p.  The plot for p is as desired, but the plot
> for q contains also the line $y=-x$.  This is using sage 4.6.1
>
> #Is this a bug?
> x,y=var('x y')
> q=implicit_plot((x-y)/(x+y)==0,(x,-2,2),(y,-2,2),color='red')
> p=implicit_plot((x+y)/(x-y)==0,(x,-2,2),(y,-2,2),color='yellow')
> show(q)
> show(p)
> show(p+q)

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to