|
11 | 11 |
|
12 | 12 | exclude_example_sections = ['units'] |
13 | 13 | multiimage = re.compile('(.*?)(_\d\d){1,2}') |
14 | | - |
| 14 | +custom_titles = {'pylab_examples' : 'pylab examples', |
| 15 | + 'lines_bars_and_markers': 'Lines, bars, and markers', |
| 16 | + 'shapes_and_collections': 'Shapes and collections', |
| 17 | + 'statistics': 'Statistical plots', |
| 18 | + 'images_contours_and_fields': 'Images, contours, and fields', |
| 19 | + 'pie_and_polar_charts': 'Pie and polar charts', |
| 20 | + 'text_labels_and_annotations': 'Text, labels, and annotations', |
| 21 | + 'ticks_and_spines': 'Ticks and spines', |
| 22 | + 'subplots_axes_and_figures': 'Subplots, axes, and figures', |
| 23 | + 'specialty_plots': 'Specialty plots', |
| 24 | + 'showcase': 'Showcase', |
| 25 | + 'api': 'API', |
| 26 | + } |
15 | 27 |
|
16 | 28 | # generate a thumbnail gallery of examples |
17 | 29 | gallery_template = """\ |
|
46 | 58 | """ |
47 | 59 |
|
48 | 60 | toc_template = """\ |
49 | | -<li><a class="reference internal" href="#{section}">{section}</a></li>""" |
50 | | - |
51 | | - |
52 | | -custom_titles = {'pylab_examples' : 'pylab examples'} |
| 61 | +<li><a class="reference internal" href="#{section}">{title}</a></li>""" |
53 | 62 |
|
54 | 63 |
|
55 | 64 | def make_thumbnail(args): |
@@ -89,7 +98,7 @@ def gen_gallery(app, doctree): |
89 | 98 | for subdir in example_sections: |
90 | 99 | title = custom_titles.get(subdir, subdir) |
91 | 100 | rows.append(header_template.format(title=title, section=subdir)) |
92 | | - toc_rows.append(toc_template.format(section=subdir)) |
| 101 | + toc_rows.append(toc_template.format(title=title, section=subdir)) |
93 | 102 |
|
94 | 103 | origdir = os.path.join('build', rootdir, subdir) |
95 | 104 | thumbdir = os.path.join(outdir, rootdir, subdir, 'thumbnails') |
|
0 commit comments