I have a set of data in the x-y plane, and each point and each point has multiple "energies" associated. I can already plot the constant-energy contour of this surface at a chosen energy, but the problem is I also want to be able to change the colours along the contours according to the variation in another set of data.
Essentially I want to try and plot this graph but be able to vary the colour at any point on any contour according to a set of data that is unrelated to the contour's position (ignore the black dotted line):
My first attempt was to use the scatter function, the idea being that enough scatter points close together would look roughly like the solid lines of the contour, but with the freedom to set the colour of each scatter point independently. However, turns out this looks terrible, and it's slow because I essentially have to find the constant-energy surface myself.
My second attempt was to extrude the data into 3-D and use the isosurface function to create face and vertex data which can be plotted with patch, and patch allows the colour to be varied. I would then view this extruded surface end-on to get a contour plot. However, this gives an infinitesimally thin surface which disappears when viewed end on, as seen here where the view is not-quite end-on:
The 3D version of what I'm aiming for looks like http://imgur.com/xbShmC7
Does anyone know of either:
A method of plotting a 2-D contour which will allow me vary the colour independently and along any contour line,
A way to make the patch graphics objects use in the second picture thicker so that they aren't invisible when viewed end-on.
Thanks.




