Skip to content

Commit

Permalink
Merge pull request #3453 from jenshnielsen/bbox_rebase_14
Browse files Browse the repository at this point in the history
Bbox rebase 14
  • Loading branch information
jenshnielsen committed Sep 2, 2014
2 parents 08c41b1 + 17cc6dd commit 3fabd50
Show file tree
Hide file tree
Showing 5 changed files with 245 additions and 2 deletions.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion lib/matplotlib/tests/test_bbox_tight.py
Expand Up @@ -84,7 +84,15 @@ def test_bbox_inches_tight_clipping():
path.vertices *= 0.25
patch.set_clip_path(path, transform=ax.transAxes)
plt.gcf().artists.append(patch)



@image_comparison(baseline_images=['bbox_inches_tight_raster'],
remove_text=True, savefig_kwarg={'bbox_inches': 'tight'})
def test_bbox_inches_tight_raster():
"""Test rasterization with tight_layout"""
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot([1.0, 2.0], rasterized=True)

if __name__ == '__main__':
import nose
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/tight_bbox.py
Expand Up @@ -83,6 +83,6 @@ def process_figure_for_rasterizing(fig, bbox_inches_restore, fixed_dpi=None):

bbox_inches, restore_bbox = bbox_inches_restore
restore_bbox()
r = adjust_bbox(figure, bbox_inches, fixed_dpi)
r = adjust_bbox(fig, bbox_inches, fixed_dpi)

return bbox_inches, r

0 comments on commit 3fabd50

Please sign in to comment.