Opened 6 years ago
Closed 6 years ago
#18286 closed defect (fixed)
Region plot fails when there is equation condition
Reported by:  yzh  Owned by:  

Priority:  major  Milestone:  sage6.7 
Component:  graphics  Keywords:  region_plot 
Cc:  kcrisman, mkoeppe, vdelecroix  Merged in:  
Authors:  Yuan Zhou  Reviewers:  Punarbasu Purkayastha 
Report Upstream:  N/A  Work issues:  
Branch:  31edb4d (Commits, GitHub, GitLab)  Commit:  31edb4deafeff5bb0c1d3798b592453cc1b4d151 
Dependencies:  Stopgaps: 
Description
region_plot can't deal with equations. For example the condition x == 0
is treated as x < 0
.
sage: x, y = var('x, y') sage: region_plot([x == 0], (x, 1, 1), (y, 1, 1)) sage: region_plot([x^2+y^2==1, x<y], (x, 1, 1), (y, 1, 1))
Change History (13)
comment:1 Changed 6 years ago by
 Branch set to u/yzh/region_plot
 Commit set to 9ae38d4f8c7fe78a1039b443aa3a9d802bc3b869
 Status changed from new to needs_review
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
 Commit changed from 9ae38d4f8c7fe78a1039b443aa3a9d802bc3b869 to 7e336a1101995eea35abf373639db5d3a397399c
Branch pushed to git repo; I updated commit sha1. New commits:
7e336a1  change the sagetrac ticket format

comment:4 Changed 6 years ago by
Why is there a duplicate ticket at #16907?
comment:5 Changed 6 years ago by
@vdelecroix: It is not quite a duplicate, but yzh has put both the patches in the same branch and has the same branch in both the tickets. It is fine though, we can close both the tickets at the same time, and close that one as a duplicate of this for merging purposes, or remove the branch from the other ticket.
@yzh: I finally had the time to look into it. The patch looks all good to me except for the warn part. Can you change that to the following
from warnings import warn warn("There are at least 2 equations;......")
This will give the warning just once to the user per sage session, instead of each time a similar command is run. After that it is up to the user to take note of this warning.
comment:6 Changed 6 years ago by
 Commit changed from 7e336a1101995eea35abf373639db5d3a397399c to 33c19254d83ac2b28d5ac896aef7e4295f1fde45
Branch pushed to git repo; I updated commit sha1. New commits:
33c1925  Change warning format

comment:7 Changed 6 years ago by
 Reviewers set to Punarbasu Purkayastha
 Status changed from needs_review to positive_review
@yzh Thanks!
comment:8 Changed 6 years ago by
 Dependencies #16907 deleted
comment:9 Changed 6 years ago by
 Status changed from positive_review to needs_work
Docbuild fails:
[plotting ] /home/buildbot/build/sage/snapperkob/sage_git/build/local/lib/python2.7/sitepackages/sage/plot/contour_plot.py:docstring of sage.plot.contour_plot.contour_plot:310: ERROR: Unknown interpreted text role "ticket".
its :trac:
comment:10 Changed 6 years ago by
 Commit changed from 33c19254d83ac2b28d5ac896aef7e4295f1fde45 to 31edb4deafeff5bb0c1d3798b592453cc1b4d151
Branch pushed to git repo; I updated commit sha1. New commits:
31edb4d  :trac: in docstring

comment:11 Changed 6 years ago by
 Status changed from needs_work to needs_review
comment:12 Changed 6 years ago by
 Status changed from needs_review to positive_review
Sorry for not noticing that earlier. It passes all tests in plot/ now. The Patchbot is also happy.
comment:13 Changed 6 years ago by
 Branch changed from u/yzh/region_plot to 31edb4deafeff5bb0c1d3798b592453cc1b4d151
 Resolution set to fixed
 Status changed from positive_review to closed
I am having an initial look at this ticket. Can you change the
ticket #12345
to the:trac:`12345`
format. Thanks. :)