# ContourPlot from a different view

Consider a function of $z=f(x,y)$ I want to have a ContourPlot with vertical axis as z and horizontal y and contour of x. How can I do that? I would appreciate if you could explain with a simple example.

P.S. The functional does not necessarily have an analytical inverse.

• Look up SliceContourPlot3D[]. – J. M. is away Sep 6 '17 at 14:51
• @J.M. this is 3D, I need 2D – Foad Sep 6 '17 at 15:00
• ContourPlot[ Evaluate@Table[z - f[x, y]==0, {x, xlevelsList}], {y, ymin, ymax}, {z, zmin, zmax}]? – kglr Oct 6 '17 at 16:06

One approach would be to create a table of values of your function:

tab = Flatten[Table[{y,f[x,y],x},{x,xmin,xmax,xstep},{y,ymin,ymax,ystep}],1]


(With some reasonable values for xmin, xmax, xstep, ymin, ymax, ystep)

You can then create a contour plot with ListContourPlot:

ListContourPlot[tab]


Obviously this requires a bit of manual fiddling to choose parameters which look good, but it should work.