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 a plot and an image to the docs #307

Closed
cdeil opened this issue Apr 16, 2014 · 16 comments
Closed

Add a plot and an image to the docs #307

cdeil opened this issue Apr 16, 2014 · 16 comments

Comments

@cdeil
Copy link
Member

cdeil commented Apr 16, 2014

It would be very nice if the Astroquery gallery contained a plot (e.g. a Herzsprung-Russel-Diagram or whatever) and an image (e.g. the Galactic center region).

That's what I expected when I clicked "gallery". :-)

@keflavich If you don't want images in the repo because of the file size, then maybe an independent IPython notebook and a link to nbviewer would be better?

@cdeil cdeil added this to the v0.2 milestone Apr 16, 2014
@keflavich
Copy link
Contributor

I think perhaps snapshots of the table.show_in_browser(jsviewer=True) would be appropriate, but I like the HR diagram idea. 👍

@cdeil
Copy link
Member Author

cdeil commented Apr 16, 2014

FYI: I don't plan to do this in case someone else wants to.
Once Fermi and TeVCat are done I can make a nice IPython notebook for gamma-rays.

@keflavich
Copy link
Contributor

That sounds great. I've added a link to one ipynb in the splatalogue docs, but I think more demo notebooks would be very useful.

@cdeil
Copy link
Member Author

cdeil commented Apr 16, 2014

@keflavich Where did you add that link?

@keflavich
Copy link
Contributor

partway down the page at astroquery.readthedocs.org/en/latest/splatalogue/splatalogue.html. I think it should be cleaned up and moved to the Gallery

@keflavich
Copy link
Contributor

Punting to wishlist.

@gracca
Copy link

gracca commented Jan 5, 2015

I constructed a HR diagram using Astroquery, if you want to use it in the gallery:
https://github.com/gracca/XHIP-HR-Diagram

@cdeil
Copy link
Member Author

cdeil commented Jan 5, 2015

@gracca I think that would be a great example! Are you be interested to turn this into a pull request for Astroquery (and change to docstrings in English)?

@keflavich How should the Gallery work technically? The simplest solution would probably be to commit PNG or SVG files to the repo, but there's also the option to let Sphinx make the plot and maybe even to use https://github.com/sphinx-gallery/sphinx-gallery or bokeh to get interactive plots. The main disadvantage of this is that the Sphinx build might fail from time to time when the download of the datasets doesn't work because the service isn't up.

@gracca
Copy link

gracca commented Jan 5, 2015

My Python skills are rather poor, but I'll be glad to contribute! No problems with changing the docstrings to English. I'll see how to make the pull request.

@keflavich
Copy link
Contributor

Thanks @gracca! Do you need help making the pull request?

@cdeil - I prefer the simpler solution for now; I prefer to have self-contained docs. But, we don't want to host too many images. If you want to make a PR to use sphinx-gallery, I'll support that, but I won't be implementing it myself.

@gracca
Copy link

gracca commented Jan 8, 2015

@keflavich: Is it as simple as clonning astroquery repo and editing docs/gallery.rst to add the example? And then commit and pull?

@keflavich
Copy link
Contributor

Pretty much, yeah. Unless we try one of the fancier plotting approaches
cdeil suggested
On Jan 8, 2015 8:49 PM, "Germán A. Racca" [email protected] wrote:

@keflavich https://github.com/keflavich: Is it as simple as clonning
astroquery repo and editing besancon.rst to add the example? And then
commit and pull?


Reply to this email directly or view it on GitHub
#307 (comment).

@cdeil
Copy link
Member Author

cdeil commented Jan 8, 2015

@keflavich - So for this case you want the PNG to be committed into the repo?
(The other simple alternative would be to put a .. plot:: directive into the rst.)

@keflavich
Copy link
Contributor

I've never used the .. plot:: directive; that sounds preferable if it works.

@cdeil
Copy link
Member Author

cdeil commented Jan 8, 2015

@gracca - In case you haven't used the Sphinx plot directive before, here's an example:

The drawback is that it will fail if the service isn't up ... but my suggestion would be to use it and if it turns out to be unreliable we can put the PNG or data in this repo or some other Github repo.

@keflavich
Copy link
Contributor

Superseded by #3027

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

5 participants