Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implicit_plot totally sucks when input an equation #5706

Closed
williamstein opened this issue Apr 7, 2009 · 5 comments
Closed

implicit_plot totally sucks when input an equation #5706

williamstein opened this issue Apr 7, 2009 · 5 comments

Comments

@williamstein
Copy link
Contributor

Make Sage hurt:

var('x,y')
implicit_plot(x^2+y^2 == 1, (x,-2,2), (y,-2,2))

The problem is that implicit_plot takes a function, not a symbolic equation, so it views "x2+y2 == 1" as a function --- and that is very painful.

SOLUTION: Check if the input is an equation, and if so, make RHS zero, and plot corresponding function equal to 0.

Component: graphics

Issue created by migration from https://trac.sagemath.org/ticket/5706

@williamstein williamstein added this to the sage-3.4.1 milestone Apr 7, 2009
@williamstein williamstein self-assigned this Apr 7, 2009
@williamstein
Copy link
Contributor Author

comment:1

Attachment: trac_5706.patch.gz

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 9, 2009

comment:2

There is one doctest failure in here:

sage -t -long "devel/sage/sage/plot/contour_plot.py"
**********************************************************************
File "/scratch/mabshoff/sage-3.4.1.rc2/devel/sage/sage/plot/contour_plot.py", line 195:
    sage: implicit_plot(x^2+y^2 == 2, (-3,3), (-3,3)).show(aspect_ratio=1)
Expected nothing
Got:
    doctest:2846: DeprecationWarning: Substitution using function-call syntax and 
unnamed arguments is deprecated and will be removed from a future release of Sage; you 
can use named arguments instead, like EXPR(x=..., y=...)
**********************************************************************
1 items had failures:

Cheers,

Michael

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 9, 2009

Attachment: trac_5706.2.patch.gz

Slightly fixed up version of William's patch due to deprecation of substitution (see #5413)

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 9, 2009

comment:3

Merged trac_5706.2.patch in Sage 3.4.1.rc2.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin removed the s: needs review label Apr 9, 2009
@sagetrac-mabshoff sagetrac-mabshoff mannequin closed this as completed Apr 9, 2009
@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Apr 9, 2009

comment:4

Ooops, didn't change the review status.

Cheers,

Michael

@sagetrac-mabshoff sagetrac-mabshoff mannequin reopened this Apr 9, 2009
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant