matplotlib/matplotlib — Issue #720: Bug with bbox_inches='tight'
Author: astrofrog
Created: 2012-02-27 09:42:57+00:00
State: open

The following script:

import matplotlib.pyplot as plt
import numpy as np

fig = plt.figure()
ax = fig.add_subplot(1,1,1)
ax.imshow(np.zeros((10, 10)))
for s in ax.spines:
ax.spines[s].set_color('black')

ax.set_xlabel('Spam')
ax.set_ylabel('Spam')

fig.savefig('frame.png', bbox_inches='tight')

produces a figure that has a white line between the bottom frame line and the colorscale (http://db.tt/1YHPzhGm). The issue disappears if the x label is removed, and if bbox_inches='tight' is removed.