[yt-dev] clickable gallery?

Nathan Goldbaum nathan12343 at gmail.com
Thu Jul 24 10:49:22 PDT 2014


I think it would be a good idea. Unfortunately to include all of the
autogenerated images in the docs would require some work above and beyond
just creating the gallery.

RIght now the cookbook directive does the correct thing and stores images
produced by the recipes in an _images directory in the final docs build.
 This makes it easy to use those images elsewhere.

Unfortunately when I made the python-script directive, I did the lazy thing
and included the images inline into the HTML of the page, making it very
difficult to use the images produced that way elsewhere in the docs.  This
is something I can fix but it will take a little while for me to figure out
how to get sphinx to relocate the images.

Since the IPython notebook displays images inline, the recipes that produce
images using notebooks also do not lend themselves to be used elsewhere in
the docs.  It is actually possible to use a custom template to split out
the images using nbconvert, but it's not necessarily straightforward and
one of us would need to figure out how to work with IPython's templating
system to get it to do the right thing.

tl;dr: right now it should be possible to make a gallery of all the outputs
of the cookbooks. This will probably require a new sphinx extension.
 Including autogenerated images from elsewhere in the docs will require
some refactoring of our existing custom sphinx extensions.

-Nathan


On Thu, Jul 24, 2014 at 10:38 AM, Cameron Hummels <chummels at gmail.com>
wrote:

> Hi Michael,
>
> I've thought about this in the past, and you're right, it would be great
> if we had such a thing in our docs.  Right now, the images generated by the
> cookbook recipes are auto-generated, so I'm not enough of a whiz with
> Sphinx to be able to make this work, but perhaps there are others on the
> team who could do this with ease?  Any interest?
>
> Cameron
>
>
> On Thu, Jul 24, 2014 at 10:33 AM, Michael Zingale <
> michael.zingale at stonybrook.edu> wrote:
>
>> One thing I was wondering is whether we should have a gallery of
>> thumbnails of the output from the various scripts in the docs that users
>> can click on to see the recipe.  In my experience, for matplotlib, this is
>> the most useful part of the documentation -- I go to the gallery (
>> http://matplotlib.org/gallery.html) find something that looks like it
>> does what I am trying to do, and then click on it to find out how to do
>> that.  This works well when you don't necessarily know the name of the type
>> of plot you are looking to make.  Just a thought.
>>
>> Mike
>>
>> --
>> Michael Zingale
>> Associate Professor
>>
>> Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
>> 11794-3800
>> *phone*:  631-632-8225
>> *e-mail*: Michael.Zingale at stonybrook.edu
>> *web*: http://www.astro.sunysb.edu/mzingale
>>
>> _______________________________________________
>> yt-dev mailing list
>> yt-dev at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>>
>>
>
>
> --
> Cameron Hummels
> Postdoctoral Researcher
> Steward Observatory
> University of Arizona
> http://chummels.org
>
> _______________________________________________
> yt-dev mailing list
> yt-dev at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-dev-spacepope.org/attachments/20140724/a22c70a0/attachment.html>


More information about the yt-dev mailing list