Opened 8 years ago
Last modified 6 years ago
#12881 new enhancement
Allow plotting zero width interval
Reported by: | kcrisman | Owned by: | jason, was |
---|---|---|---|
Priority: | minor | 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 )
plot(x,x,0,0) Traceback (click to the left of this block for traceback) ... ValueError: plot start point and end point must be different
Maybe this shouldn't be an error, but instead give an empty plot or a point? See below for discussion.
Change History (7)
comment:1 Changed 8 years ago by
comment:2 Changed 8 years ago by
Indeed I cannot reproduce this on Sage 5.0.beta13.
comment:3 Changed 8 years ago by
- Description modified (diff)
- Summary changed from Plotting zero interval raises dumb error to Allow plotting zero width interval
- Type changed from defect to enhancement
Oh, and this is clearly a dup and invalid as it stands, because I was using our old campus server. Nice!
But I'm going to change this. I wonder if this maybe shouldn't give rise to an empty graphic, or maybe just a point. The reason is that in the wild, one can't always predict what one will want. As an example:
var('y') @interact def _(t = [pi/6*n for n in [1..18]]): P = plot(1/2*sin(y),(x,0,t),fill=True,tick_formatter=pi,ticks=pi/6) Q = plot(1/2*sin(y),(x,0,3*pi),tick_formatter=pi,ticks=pi/6) show(P+Q) html("The integral up to $y=%s$ is $\\approx %s$."%(latex(t),latex(integral(1/2*sin(y),y,0,t).n())))
I would really like to have it be from [0..18]
, since I already have a plot and it would be nice to have this work since integration from 0 to 0 works - but this error stands in the way.
comment:4 Changed 7 years ago by
- Milestone changed from sage-5.11 to sage-5.12
comment:5 Changed 6 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
See #11753, which should have fixed this.