Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add blank lines for a couple plots in reference manual #13009

Closed
kcrisman opened this issue May 25, 2012 · 7 comments
Closed

Add blank lines for a couple plots in reference manual #13009

kcrisman opened this issue May 25, 2012 · 7 comments

Comments

@kcrisman
Copy link
Member

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.

Component: graphics

Keywords: sd40.5

Author: Dan Drake

Reviewer: Karl-Dieter Crisman

Merged: sage-5.1.beta4

Issue created by migration from https://trac.sagemath.org/ticket/13009

@kini
Copy link
Collaborator

kini commented May 25, 2012

comment:1

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!

@kcrisman
Copy link
Member Author

comment:2

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.

@dandrake
Copy link
Contributor

Attachment: 13009.patch.gz

@dandrake
Copy link
Contributor

Author: Dan Drake

@kcrisman
Copy link
Member Author

Reviewer: Karl-Dieter Crisman

@kcrisman
Copy link
Member Author

comment:4

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

@jdemeyer
Copy link

Merged: sage-5.1.beta4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants