Opened 9 years ago
Closed 9 years ago
#12214 closed defect (duplicate)
polygon documentation in error
Reported by: | kcrisman | 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 9 years ago by
Changed 9 years ago by
comment:2 Changed 9 years ago by
- Status changed from new to needs_review
I just changed the references from polygon.options to polygon2d.options and polygon3d.options.
comment:3 Changed 9 years ago by
- Reviewers set to Karl-Dieter Crisman
- Status changed from needs_review to 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 9 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 9 years ago by
comment:6 Changed 9 years ago by
- Keywords sd35.5 added
comment:7 in reply to: ↑ 4 Changed 9 years ago by
But for some reason the
options
never changed.
This is now #12300.
comment:8 Changed 9 years ago by
- Milestone changed from sage-5.1 to sage-duplicate/invalid/wontfix
- Status changed from needs_work to positive_review
This is a dup of #6367, more or less. Added the author of this patch there as well.
comment:9 Changed 9 years ago by
- Keywords sd40.5 added
comment:10 Changed 9 years ago by
- Resolution set to duplicate
- Status changed from positive_review to closed
Here's what actually works