Opened 7 years ago
Closed 6 years ago
#16907 closed defect (duplicate)
Adding two region plots yields surprising results
Reported by:  kcrisman  Owned by:  

Priority:  major  Milestone:  sageduplicate/invalid/wontfix 
Component:  graphics  Keywords:  
Cc:  kcrisman, mkoeppe, vdelecroix  Merged in:  
Authors:  Yuan Zhou  Reviewers:  Punarbasu Purkayastha 
Report Upstream:  N/A  Work issues:  
Branch:  Commit:  
Dependencies:  Stopgaps: 
Description (last modified by )
I have removed the branch from this ticket. Once #18286 is positively reviewed, I will set this too to positive review.  ppurka
And wrong ones, of course. See this sagesupport thread.
sage: disc1= region_plot(lambda x, y : x^2+y^2 < 1, (x, 1, 1), (y, 1, 1)) sage: disc2= region_plot(lambda x, y : (x0.7)^2+(y0.7)^2 < 0.5, (x, 2, 2), (y, 2, 2) )
then do disc1+disc2
and disc2+disc1
for some surprises. Most likely we are abusing contourf
in matplotlib a little by allowing the adding of these plots.
Change History (14)
comment:1 Changed 7 years ago by
comment:2 Changed 6 years ago by
 Branch set to u/yzh/region_plot
 Cc kcrisman mkoeppe ppurk added
 Commit set to c0770dc34e8482eb5d1c04338820e361a2a4cb4b
 Milestone changed from sage6.4 to sage6.7
 Status changed from new to needs_review
comment:3 Changed 6 years ago by
 Cc vdelecroix added
comment:4 followup: ↓ 5 Changed 6 years ago by
 Cc ppurk removed
Interesting fix! Do you think the change in the "endpoints" for the contours will make a big difference? Thanks for the contribution, I'll put this on my list for things to review once the semester is over.
comment:5 in reply to: ↑ 4 Changed 6 years ago by
Replying to kcrisman:
Interesting fix! Do you think the change in the "endpoints" for the contours will make a big difference? Thanks for the contribution, I'll put this on my list for things to review once the semester is over.
Do you mean the change of contours
from [1e307, 0, 1e307]
to [1e20, 0, 1e20]
?
Yes, I think setting contours=[1e307, 0, 1e307]
was not a good idea. I tried
sage: x,y = var('x,y') sage: region_plot(x^2+y^2 < 1, (x, 1, 1), (y, 1, 1), incol='blue', outcol='red',alpha=0.5)
with setting contours=[0.2, 0, 0.2]
, and figured out that the meaning of the "endpoints" was quite different from what I had imagined.
comment:6 Changed 6 years ago by
 Commit changed from c0770dc34e8482eb5d1c04338820e361a2a4cb4b to 9ae38d4f8c7fe78a1039b443aa3a9d802bc3b869
Branch pushed to git repo; I updated commit sha1. New commits:
9ae38d4  Modify region_plot(): works for equation conditions as well

comment:7 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:8 Changed 6 years ago by
Why is there a duplicate ticket at #18286?
comment:9 Changed 6 years ago by
 Branch u/yzh/region_plot deleted
 Commit 7e336a1101995eea35abf373639db5d3a397399c deleted
 Description modified (diff)
 Reviewers set to Punarbasu Purkayastha
I have removed the branch from this ticket. Once #18286 is positively reviewed, I will set this too to positive review.
comment:10 Changed 6 years ago by
 Status changed from needs_review to positive_review
comment:11 Changed 6 years ago by
What am I supposed to do with this ticket? If you want it closed without merging a branch: This ticket should be set to duplicate/invalid/wontfix, and #18286 should not depend on this ticket.
comment:12 Changed 6 years ago by
 Status changed from positive_review to needs_review
comment:13 Changed 6 years ago by
 Milestone changed from sage6.7 to sageduplicate/invalid/wontfix
 Status changed from needs_review to positive_review
comment:14 Changed 6 years ago by
 Resolution set to duplicate
 Status changed from positive_review to closed
cc: me. Also, I don't see how this could be fixed. :(