Opened 11 years ago
Closed 10 years ago
#12214 closed defect (duplicate)
polygon documentation in error
Reported by: | Karl-Dieter Crisman | Owned by: | jason, was |
---|---|---|---|
Priority: | minor | Milestone: | sage-duplicate/invalid/wontfix |
Component: | graphics | Keywords: | beginner sd35.5 sd40.5 |
Cc: | Merged in: | ||
Authors: | Reviewers: | Karl-Dieter Crisman | |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
Type polygon.options for a dictionary of the default options for polygons.
This seems to not be correct.
sage: polygon.options --------------------------------------------------------------------- AttributeError: 'function' object has no attribute 'options'
We should fix the documentation to
sage: sage.plot.polygon.polygon2d.options {'alpha': 1, 'legend_label': None, 'rgbcolor': (0, 0, 1), 'thickness': 0}
or something else that fixes this.
Attachments (1)
Change History (11)
comment:1 Changed 11 years ago by
Changed 11 years ago by
Attachment: | trac_12214_polygon_options.patch added |
---|
comment:2 Changed 11 years ago by
Authors: | → ksmith |
---|---|
Status: | new → needs_review |
I just changed the references from polygon.options to polygon2d.options and polygon3d.options.
comment:3 Changed 11 years ago by
Authors: | ksmith → Kenny Smith |
---|---|
Reviewers: | → Karl-Dieter Crisman |
Status: | needs_review → needs_work |
Apparently the documentation is actually wrong about how reset
works. I'll look into this. This should definitely be fixed at the same time, so "needs work", but the initial change is fine.
comment:4 follow-up: 7 Changed 11 years ago by
This is really weird. Apparently the resetting of options actually does work! But...
sage: polygon2d.options {'alpha': 1, 'legend_label': None, 'rgbcolor': (0, 0, 1), 'thickness': 0} sage: P = polygon([[1,2], [5,6], [5,0]]); P # looks blue sage: polygon2d.options['rgbcolor']=(1,0,0) sage: P = polygon([[1,2], [5,6], [5,0]]); P # looks red sage: polygon2d.options {'alpha': 1, 'legend_label': None, 'rgbcolor': (1, 0, 0), 'thickness': 0} sage: polygon2d.defaults() {'alpha': 1, 'legend_label': None, 'rgbcolor': (0, 0, 1), 'thickness': 0} sage: polygon2d.reset() sage: polygon2d.options {'alpha': 1, 'legend_label': None, 'rgbcolor': (1, 0, 0), 'thickness': 0} sage: P = polygon([[1,2], [5,6], [5,0]]); P # looks blue again like it should
But for some reason the options
never changed.
I've asked about this on sage-devel. But in any case if that doesn't work, it is also that way on disk and others (I've checked), so that wouldn't hold things up on this.
Anyway, that means we just have to change to polygon2d.reset()
and polygon3d.reset()
.
comment:5 Changed 11 years ago by
Authors: | Kenny Smith → Kenneth Smith |
---|
comment:6 Changed 11 years ago by
Keywords: | sd35.5 added |
---|
comment:7 Changed 11 years ago by
But for some reason the
options
never changed.
This is now #12300.
comment:8 Changed 10 years ago by
Authors: | Kenneth Smith |
---|---|
Milestone: | sage-5.1 → sage-duplicate/invalid/wontfix |
Status: | needs_work → positive_review |
This is a dup of #6367, more or less. Added the author of this patch there as well.
comment:9 Changed 10 years ago by
Keywords: | sd40.5 added |
---|
comment:10 Changed 10 years ago by
Resolution: | → duplicate |
---|---|
Status: | positive_review → closed |
Here's what actually works