Opened 10 years ago

# Allow plotting zero width interval

Reported by: Owned by: kcrisman jason, was minor sage-6.4 graphics N/A

```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.

### comment:1 Changed 10 years ago by kini

See #11753, which should have fixed this.

### comment:2 Changed 10 years ago by kini

Indeed I cannot reproduce this on Sage 5.0.beta13.

### comment:3 Changed 10 years ago by kcrisman

• 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 9 years ago by jdemeyer

• Milestone changed from sage-5.11 to sage-5.12

### comment:5 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.1 to sage-6.2

### comment:6 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.2 to sage-6.3

### comment:7 Changed 8 years ago by vbraun_spam

• Milestone changed from sage-6.3 to sage-6.4
Note: See TracTickets for help on using tickets.