I have tried to plot two perpendicular to z axis 4-D surfaces with scatter data (Color as forth dimention). It's easy to plot this surfaces but the color won't follow the ColorData and it will be depended on z-axis value which in my case will be constant value. The only way that I found for this, is using color function which I don't have it. And I also could not predict this four variables function using Matlab.
The code is as follows. I want to change it's result (first figure) to something like second figure.
x1=[2,3,2,3];y1=[20,20,30,30];z1=[1,1,1,1];c1=[0.971,0.942,0.952,0.929];x2=[2,3,2,3];y2=[20,20,30,30];z2=[3,3,3,3];c2=[1.310,1.328,1.352,1.397];scatHand=scatter3(x1,y1,z1,'filled');set(scatHand,'CData',c1);hold on;scatHand=scatter3(x2,y2,z2,'filled');set(scatHand,'CData',c2);hold off;
Code Result:
My Desire:
Best Answer