From 27af46706d219eb1fffe613fef8cb27af708517b Mon Sep 17 00:00:00 2001 From: Tony S Yu Date: Mon, 20 Feb 2012 10:12:47 -0500 Subject: [PATCH] DOC: tweak image sizes in gallery. If images are limited to 8-inch widths and the figure dpi is 100, 1/4 scale thumbnails will be 200px wide. --- doc/ext/gen_rst.py | 23 +--------------------- doc/source/themes/agogo/static/agogo.css_t | 19 +++++++++++++++++- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/doc/ext/gen_rst.py b/doc/ext/gen_rst.py index 9a9527c8..89da260d 100644 --- a/doc/ext/gen_rst.py +++ b/doc/ext/gen_rst.py @@ -114,27 +114,6 @@ def generate_example_rst(app): fhindex = file(os.path.join(root_dir, 'index.txt'), 'w') fhindex.write("""\ -.. raw:: html - - - Examples ======== @@ -280,7 +259,7 @@ def generate_file_rst(fname, target_dir, src_dir, plot_gallery): this_template = plot_rst_template from matplotlib import image if os.path.exists(first_image_file): - image.thumbnail(first_image_file, thumb_file, 0.2) + image.thumbnail(first_image_file, thumb_file, 0.25) if not os.path.exists(thumb_file): # create something not to replace the thumbnail diff --git a/doc/source/themes/agogo/static/agogo.css_t b/doc/source/themes/agogo/static/agogo.css_t index 20219626..26280cd3 100644 --- a/doc/source/themes/agogo/static/agogo.css_t +++ b/doc/source/themes/agogo/static/agogo.css_t @@ -362,6 +362,23 @@ div.footer, div.footer a { color: #888a85; } +.figure { + float: left; + margin: 1em; +} + +.figure img { + display: block; + margin-left: auto; + margin-right: auto; + max-height: 150px; +} + +.figure .caption { + width: 200px; + text-align: center !important; +} + /* Styles copied from basic theme */ @@ -653,7 +670,7 @@ th { /* ----------------- Example Gallery ----------------- */ .gallery { - min-height: 250px; + height: 200px; } .gallery p.caption a{