From: Patrik S. <pat...@ne...> - 2004-09-22 08:06:56
|
Hi there, matplotlib.text.Text._get_layout(self, renderer) caches its return value in the dictionary matplotlib.text.Text.cached. Since it is never emptied, it causes problems when one creates many figures. Below, t0.png is ok but t1.png has the vertical tick label 0 in the wrong place. import matplotlib matplotlib.use('Agg') from matplotlib.matlab import * y = [[100, 250], [10, 25]] for i in range(2): figure(1) bar([0,1], y[i]) savefig('t%d.png' % i) # Uncomment to fix #matplotlib.text.Text.cached = {} close('all') -- Patrik |