Opened 10 years ago
Last modified 8 years ago
#12676 new defect
plot exclude sometimes just connects instead of excluding
Reported by: | kcrisman | Owned by: | jason, was |
---|---|---|---|
Priority: | major | Milestone: | sage-6.4 |
Component: | graphics | Keywords: | |
Cc: | Merged in: | ||
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description (last modified by )
This email on sage-support pretty much says it all.
I am trying to understand the behaviour of the option exclude in plot() when a range of values is included. It looks to me that if a simple range like "exclude=[pi..2*pi]" is used and the function is defined and real-valued in that range then the end points and integer points between are excluded from the plot, whilst if the function is not real-valued in the range, e.g. "sin(x)cos(x)", then the whole range is excluded. However, if several ranges are specified then when the function is real-valued the behaviour is like that for a single range, whilst if the function is not real-valued then the graph *is* plotted, incorrectly, for ranges after the first. For example the graph of "plot(sin(x)cos(x),(x,0,4*pi),exclude=[pi..2*pi,3*pi..4*pi])" contains a straight line between 3*pi and 4*pi. Surely this cannot be the intended behaviour?
See also the relevant code in Sage 4.8.
Change History (7)
comment:1 Changed 10 years ago by
- Description modified (diff)
comment:2 Changed 10 years ago by
comment:3 Changed 10 years ago by
- Description modified (diff)
comment:4 Changed 9 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 8 years ago by
- Milestone changed from sage-6.1 to sage-6.2
comment:6 Changed 8 years ago by
- Milestone changed from sage-6.2 to sage-6.3
comment:7 Changed 8 years ago by
- Milestone changed from sage-6.3 to sage-6.4
Note
So the following allows us to see more clearly what is going on.
Compare
to
to
Another couple to compare:
which really shows that there is something subtle about the points involved when we have parts that can't be plotted due to not being real.