Collections attribute deprecation in version > 3.8

@rcomer
MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed in 3.10.
for contour in originfig.collections:
I don’t know how to modify this, could help me please

for contour in originfig.collections:
        contour.set_clip_path(clip)