I have another question for you. I am currently using the function contour
import matplotlib.pyplot as plt
cs = plt.contour(Z,X_,axial, levels = calc_levels,colors='k')
I would like to create the contour object cs
without having to plot the contours to a figure, I need to find the contour of 1000's of objects and can do without 1000's of figures. (I'm using the contour object to calculate areas at different heights and only want to return the area value, question here)
I was thinking the best way of achieving this is to edit the function's code, but I don't know how to access it.
From other questions I have read about about accessing source code I have tried
import inspect
inspect.getsourcelines(plt.contour)
but I don't think what is returned is the code. At least it's not what I was expecting and doesn't look like code to my noob eyes!
Would you be able to help me with this please? Thanks