I too used Inkscape to look at it. I suspect there is a clipping mask in there. If I enter Group #G879 (these group numbers are generated on the fly I suspect), then enter Group #G877 by right clicking on graph line, I can move the graph line around. But where it might extend beyond the boundaries of the rectangle it is clipped.
I have found that Draw doesn’t cope well with clipping masks and it creates unexpected outcomes such as you have seen. Bugs tdf#44731 and tdf#86211 might be related to the effect on the svg. EDIT added tdf#100135 as it specically mentions python’s matplotlib
Image of clipping mask effect in Inkscape.
I am not adept enough in Inkscape to remove the mask, a search on internet is likely to find a result. Cheers, Al