X = np.arange(10)
Y = np.arange(10)
Z = np.random.random((10, 10))
fig = plt.figure()
ax = fig.add_subplot(111)
A = ax.get_children()
cs = ax.contour(X, Y, Z)
B = ax.get_children()
C = [ref for ref in B if ref not in A]
fig2 = plt.figure()
ax2 = fig2.add_subplot(111)
ax2.add_collection(C[0])
Retrieve matplotlib ContourSet for SymPy plots