I do not know if this is the answer, but I think I am not wrong on that.
I have implemented contour lines and stuff for my own project and I think it is the same situation in all projects. In order to create graphics like that you do not explicitly create the curves, it would be too hard and I think almost impossible. Any algorithms does not try to create the curves itself, but split the space in small squares, and in each small square they test the values and draws very simple shapes. One well known algorithm is marching squares. Check the drawings from that page and you will soon understand how it works.
The algorithm approximates the curves that you finally see, but because the squares are small you do not see that they are only approximations. The trouble with such structure is that it contains a lot of information and it would be a great effort to keep that information somewhere and from that data to resemble the curves that you want. The usual approach is simply to not keep the whole stuff but run the algorithms and draw directly on the raster image. It is much easier and does not waste memory for the eventuality that somebody would want to do something with that.
I am not saying that the library you use does not provide the data structure from which you can resemble the iso curves, since I do not know, I say only that I would not offer some feature since anyway it is rarely used and requires a lot of resources.
Going further, I think that what you need is not the iso curve information, but a function which given a color would return you a value. A better place to find that transformation would be the scale object, not the graph itself.
As far as I know matplotlib offers a scale object.