Skip to content

Commit 17cc6dd

Browse files
jowrjenshnielsen
jowr
authored andcommitted
Added tests to bbox_tight
1 parent d5dafdb commit 17cc6dd

File tree

4 files changed

+244
-1
lines changed

4 files changed

+244
-1
lines changed
Binary file not shown.
Lines changed: 235 additions & 0 deletions
Loading

lib/matplotlib/tests/test_bbox_tight.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,15 @@ def test_bbox_inches_tight_clipping():
8484
path.vertices *= 0.25
8585
patch.set_clip_path(path, transform=ax.transAxes)
8686
plt.gcf().artists.append(patch)
87-
87+
88+
89+
@image_comparison(baseline_images=['bbox_inches_tight_raster'],
90+
remove_text=True, savefig_kwarg={'bbox_inches': 'tight'})
91+
def test_bbox_inches_tight_raster():
92+
"""Test rasterization with tight_layout"""
93+
fig = plt.figure()
94+
ax = fig.add_subplot(111)
95+
ax.plot([1.0, 2.0], rasterized=True)
8896

8997
if __name__ == '__main__':
9098
import nose

0 commit comments

Comments
 (0)