cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
burakbagdatli
Level III

Surface plot with different z and contour axes

I would like to plot a surface plot with x, y, and z axes as the positions in the graph "cube" but use a different axis (I'll call this axis "p") to overlay data on top of the surface.

 

However, when I plot a surface using my 4 axes, as soon as I put Z as my response and choose surface as a style, the surface fill defaults to Z's values which isn't very useful. It's basically plotting the same variable in two ways.

 

Is it possible to script my way out of this? Could a different column be used as a continuous/discrete gradient surface fill?

 

 

Example:

I want the surface to look exactly like this with XYZ as coordinates but use column P as the continuous fill not Z:

image.png

Ignore "Column 4" in the example screenshot. It's empty and serves no purpose.

 

I have attached a prototype data table to this message that I was trying things on.

What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins
1 ACCEPTED SOLUTION

Accepted Solutions
Craige_Hales
Super User

Re: Surface plot with different z and contour axes

Custom Visualization uses the Scene3D/OpenGL underpinnings of the surface plot to make a visualization similar to what you describe. The surface coloring and surface height are from two different functions. The surface height is animated across time. You could also just render a single frame and try using an ArcBall to rotate it with the mouse. The example uses a lot of polygons with color specified for each corner and might need better hardware or fewer polygons to perform well. There are also examples in the scene3D example folder; you may need to add an axis and other labeling.

CraterCrater

Also, you can display multiple functions, and you can make one of the functions be a contour plot on the floor of the cube.

Two different functions, one as a surface, one as a contourTwo different functions, one as a surface, one as a contour

The contour lines of one function can't be mapped onto the surface of another function with this platform.

Craige

View solution in original post

4 REPLIES 4
burakbagdatli
Level III

Re: Surface plot with different z and contour axes

Further context: if P is a formula column, I can achieve a close-enough effect but the graph is not contained within the data ranges and the sheet basically extends to a rectangular bounds of xmin,xmax and ymin,ymax. As you can see, I'm trying to get a custom shape with my coordinates with bits and pieces missing from the x and y ranges.

What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins
Craige_Hales
Super User

Re: Surface plot with different z and contour axes

Custom Visualization uses the Scene3D/OpenGL underpinnings of the surface plot to make a visualization similar to what you describe. The surface coloring and surface height are from two different functions. The surface height is animated across time. You could also just render a single frame and try using an ArcBall to rotate it with the mouse. The example uses a lot of polygons with color specified for each corner and might need better hardware or fewer polygons to perform well. There are also examples in the scene3D example folder; you may need to add an axis and other labeling.

CraterCrater

Also, you can display multiple functions, and you can make one of the functions be a contour plot on the floor of the cube.

Two different functions, one as a surface, one as a contourTwo different functions, one as a surface, one as a contour

The contour lines of one function can't be mapped onto the surface of another function with this platform.

Craige
Craige_Hales
Super User

Re: Surface plot with different z and contour axes

Also, if you want to create a hole in the surface, arrange for the formula to return missing values for Z.

Craige
burakbagdatli
Level III

Re: Surface plot with different z and contour axes

Thanks a lot! You've saved me countless hours of further trials.

 

I was hoping not to go into the 3D scenes but it appears to be the only solution. I'll look into your example as well. I've done very little with 3D Scenes so I got some things to learn.

 

Anyway, thanks for the reply.

What we see of the real world is not the unvarnished real world but a model of the real world, constructed so it is useful for dealing with the real world. —Richard Dawkins