OK, you were right. That was easy
title is an axes command
figure(figsize=(10,7),dpi=100)
title(title_str)
implicitly makes a call to gca(), which creates subplot(111) by
default. Move the title command to below the first subplot call and
your problem will be fixed.
matlab handles this situation on calls to subplot by deleting other
subplots that overlap the one just generated. This would probably be
the most user friendly way to do it -- you could still make
overlapping Axes by either using the axes command or the
fig.add_subplot command, but perhaps in the pylab interface we should
help out by doing the thing that is right 99% of the time. With the
philosophy that if you truly want overlapping axes, you're enough of a
guru to use axes to get it. Rarely would you intentionally generate
overlapping axes with the subplot command, because it doesn't offer
enough precision.
BTW, see examples/figtext.py for an example of how to create a figure
title, as opposed to an axes title.
JDH