spine locations are not reported correctly

Hi.

The following code reports a location for the axis spines due to the
print command in the last statement. If I re-run that last print command
immediately after running everything else, it reports different values.
Do other people experience this? I thought that the plt.show() command
is sort-of like a 'flush' command, but it does not appear to work that
way.

How can I flush/update/whatever the plot in code so that I can access
the spine locations?

Thanks,

  -k.
  
im = np.arange(256).reshape(16,16)
fig = plt.figure(1)
fig.clf()
ax = fig.add_subplot(211)
ax.imshow(im)
plt.show()
print ax.spines['left'].get_verts()

* On 2014-11-24 at 09:46, Ken Mankoff wrote:

How can I flush/update/whatever the plot in code so that I can access
the spine locations?

plt.draw() instead of plt.show()

  -k.