Skip to content

Added labels to images in the gallery [sprint] #2161

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

Merged
merged 1 commit into from
Jun 29, 2013
Merged

Added labels to images in the gallery [sprint] #2161

merged 1 commit into from
Jun 29, 2013

Conversation

tbekolay
Copy link
Contributor

Right now the label is just the filename of the example, but it should be a string that we define in the example file (like in scikits-image / scikits-learn).

- Right now it's just the filename of the example
- It should perhaps be a string that we define in the example file
  (like in scikits-image / scikits-learn)
@@ -121,6 +121,7 @@ def generate_example_rst(app):
rstfile = '%s.rst'%basename
outrstfile = os.path.join(rstdir, rstfile)

# XXX make into title
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow this comment. Would you mind expanding on this (in this github interface before adding a new commit)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to write titles for each of the example plots, likely in a file-level docstring. I was just making a note to myself that if each plot has a title, then it'd be good to change the following line to something like fhsubdirIndex.write(' %s <%s>\n'%(filetitle,rstfile)).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. Maybe you could update this comment along the lines of:

# XXX: We might consider putting extra metadata in the example files to include a title. If so, this line is where we would add this information.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #2174.

@pelson
Copy link
Member

pelson commented Jun 28, 2013

Great idea. I've wanted to be able to use ctrl+F for textual search for a while, so this really improves the situation.

@NelleV
Copy link
Member

NelleV commented Jun 29, 2013

Apart from @pelson's comment, I'm 👍

@mdboom
Copy link
Member

mdboom commented Jun 29, 2013

👍 from me, too.

mdboom added a commit that referenced this pull request Jun 29, 2013
Added labels to images in the gallery [sprint]
@mdboom mdboom merged commit 4f29479 into matplotlib:master Jun 29, 2013
@tbekolay tbekolay deleted the better-gallery branch June 30, 2013 18:51
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

Successfully merging this pull request may close these issues.

5 participants