Olle Engdeg�rd wrote:
Sorry for not being clear enough.
I see this only when exporting to svg, importing it to Inkscape and then saving as pdf there. Never interactively. And never if exporting directly to pdf from matplotlib.
It could very well be a bug in Inkscape, but matplotlib is still saving data that should not be there, this is what I wanted to point out.
And I take it back that it doesn't show in Inkscape, it was just hidden from view. The extra bars are there.
You were clear -- it was just early in the morning for me here and my eyes to brain converter wasn't working properly 
The drawing and then clipping is normal behavior. All of the backend formats have the ability to clip out arbitrary regions for drawing, so we take advantage of that rather than doing our own geometric clipping algorithm. The latter is a great deal of work to get right.
It sounds like the Inkscape PDF export is not exporting the clipping path correctly, which may actually be related to the version of Cairo Inkscape is using. In any case, there's not much we can do here.
Mike