'this method is called whenever the pathpatchgon object is called'

def pathpatch_changed(self, pathpatch):

    vis = self.line.get_visible()
    plt.Artist.update_from(self.line, pathpatch)
    self.line.set_visible(vis)
