I am using matplotlib to show an image using:
fig = figure()
ax = fig.add_subplot(111)
After doing this, I want to find the contours for a different image (with different dimensions), but I do not want to interact with the current figure or axes, I just want to retrieve the set of LineCollection objects for the contours. The issue is that if I do
c = contour(image2)
the contours are stored inside c, but at the same time they are plotted in the current figure. If I use
then the contours are not plotted immediately, but the view interval has already been changed inside ax.
So essentially, I am wondering if it is possible to retrieve a set of LineCollection objects without acting in any way on the current figure/axes.
Thanks for any help,