Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Choose thumbnail image from multiple figures in same example #110

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

Closed
adrn opened this issue Mar 25, 2016 · 3 comments
Closed

Choose thumbnail image from multiple figures in same example #110

adrn opened this issue Mar 25, 2016 · 3 comments

Comments

@adrn
Copy link
Contributor

adrn commented Mar 25, 2016

Is there a way to choose the thumbnail image figure for examples that generate multiple figures?

@Titan-C
Copy link
Member

Titan-C commented Mar 25, 2016

For the moment this feature is not available/designed. It is in our plan. Possible we might implement it by introducing comment flags on the file header to specify if a particular image is to be preferred.

@lesteve
Copy link
Member

lesteve commented Mar 30, 2016

This could work I guess. You would use some kind of number inside the example source code, right, something like:

sphx_glr_fig_number = 3

If the variable is not found it would default to 0 to match the current behaviour.

Alternatively we could have a convention that if a variable with an agreed name and of the right type (some kind of matlplotlib figure) is found in the __main__ namespace then it is used for the gallery thubmnail . I am not convinced it is better though, a bit more complicated and intrusive in the example code.

@lesteve
Copy link
Member

lesteve commented Mar 30, 2016

You would use some kind of number inside the example source code, right, something like:

I think part of what I was trying to say is that just using a variable in the __main__ namespace would be simpler than to a magical comment/header that you have to parse.

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

No branches or pull requests

3 participants