Opened 12 years ago
Last modified 5 years ago
#3861 new defect
automatic line smoothing shouldn't be automatic, or should at least be documented
Reported by: | mclean | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | graphics | Keywords: | line3d, Line, smoothing, corner_cutoff |
Cc: | kcrisman | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
line3d for instance calls Line in
/usr/local/sage/3.0.6/devel/sage/sage/plot/plot3d/shapes2.py
Which automatically applies some smoothing using corner_cutoff, which is buggy and poorly documented as in #3859
(See above Ticket for an example of how this can be bad.)
It is important that I plot lines directly, and automatic smoothing should either not be automatic, or should be documented, even for functions that do not reference the smoothing directly like in Line3d. Perhaps a 'smooth' keyword is more informative than the undocumented corner_cutoff.
The smoothing is done in the Line class object, and not in pmol, so it can (and should!) be selectively applied.
Fixing the referenced ticket is a workaround (set corner_cutoff = 1), but is very clunky, and currently does not even work.
Change History (9)
comment:1 Changed 12 years ago by
comment:2 Changed 11 years ago by
- Report Upstream set to N/A
I also agree with Robert. Notice also that:
sage: my_points=[[0,0,0],[1,0,0],[0,1,0]] sage: my_points_tuples=map(tuple,my_points) sage: sage.plot.plot3d.shapes2.Line(my_points,corner_cutoff=0) Traceback (most recent call last): ... TypeError: unhashable type: 'list' sage.plot.plot3d.shapes2.Line(my_points_tuples,corner_cutoff=0) #works sage: sage.plot.plot3d.shapes2.Line(my_points_tuples, corner_cutoff=1) Traceback (most recent call last): ... TypeError: 'NoneType' object is unsubscriptable sage: sage.plot.plot3d.shapes2.Line(my_points_tuples, corner_cutoff=.999) # works
comment:3 Changed 11 years ago by
That last error is already #3859
comment:4 Changed 7 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 7 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 6 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 6 years ago by
- Milestone changed from sage-6.3 to sage-6.4
comment:8 Changed 6 years ago by
- Description modified (diff)
comment:9 Changed 5 years ago by
- Cc kcrisman added
I like the idea of a smoothnes parameter, 0=False meaning don't smooth at all, 1=True being some good default, and something higher (say 2) to forceable splite the whole thing.
I agree it could be better documented, but I think smoothing is very useful when you are trying to visualize curves. Of course, if you're plotting stock data then it is really bad.