Opened 10 years ago

Closed 10 years ago

# Add blank lines for a couple plots in reference manual

Reported by: Owned by: kcrisman jason, was trivial sage-5.1 graphics beginner, sd40.5 sage-5.1.beta4 Dan Drake Karl-Dieter Crisman N/A

### Description

In graphics.py, we have

```plot(sin(pi*x), (x, -8, 8)) # Labels not so helpful
plot(sin(pi*x), (x, -8, 8), ticks=2) # Multiples of 2
plot(sin(pi*x), (x, -8, 8), ticks=[[-7,-3,0,3,7],[-1/2,0,1/2]]) # Your choices
plot(sin(pi*x), (x, -8, 8), ticks=[[],[]]) # No ticks at all!
```

but then in the live documentation only the last one shows up, so we should separate them with

```::

```

things.

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

Oh, is that why there are so many extra `::` in Sage docstrings? I wondered about that.

Why not just wrap them with show() or put them in a single "line" by wrapping them with parentheses and semicolons?

```show(plot(sin(pi*x), (x, -8, 8))) # Labels not so helpful
show(plot(sin(pi*x), (x, -8, 8), ticks=2)) # Multiples of 2
show(plot(sin(pi*x), (x, -8, 8), ticks=[[-7,-3,0,3,7],[-1/2,0,1/2]])) # Your choices
show(plot(sin(pi*x), (x, -8, 8), ticks=[[],[]])) # No ticks at all!
```

or

```( plot(sin(pi*x), (x, -8, 8)) ; # Labels not so helpful
plot(sin(pi*x), (x, -8, 8), ticks=2) ; # Multiples of 2
plot(sin(pi*x), (x, -8, 8), ticks=[[-7,-3,0,3,7],[-1/2,0,1/2]]) ; # Your choices
plot(sin(pi*x), (x, -8, 8), ticks=[[],[]]) ) # No ticks at all!
```

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

Well, whatever. We've basically been doing it this way for a while, and since `plot(foo)` does indeed implicitly call show, it's a little easier. There are some doctests out there that use the `show()` syntax. But I do prefer the `::` business.

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

• Authors set to Dan Drake
• Status changed from new to needs_review

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

• Reviewers set to Karl-Dieter Crisman
• Status changed from needs_review to positive_review

I don't see a problem with this. Positive review, thanks.

### comment:5 Changed 10 years ago by jdemeyer

• Merged in set to sage-5.1.beta4
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.