6
$\begingroup$

Here comes some sample data

data = {{7.97028, 10., -3080}, {9.19676, 9.6, -3010}, 
        {8.50347, 10.1, -3162}, {9.92937, 9.6, -3090}, 
        {9.14074, 9.8, -3056}, {10.4484, 9.9, -3200}, 
        {8.06007, 10.1, -3130}, {9.82587, 9.8, -3090}, 
        {7.77652, 10.1, -3080}, {10.3784, 10.1, -3190}, 
        {8.77662, 10., -3119}, {8.96429, 10., -3115}, 
        {9.35687, 10., -3108}, {9.61884, 10., -3110}, 
        {9.95886, 9.7, -3100}, {8.12258, 9.7, -3000}, 
        {9.68049, 10.1, -3133}, {10.0694, 9.7, -3120}, 
        {7.7865, 10., -3050}, {8.97676, 9.8, -3055}, 
        {8.11848, 9.8, -3030}, {9.50436, 9.6, -3030}, 
        {8.66752, 9.9, -3085}, {10.1224, 9.6, -3130},
        {9.75226, 9.6, -3060}, {10.3547, 9.9, -3180}, 
        {10.1595, 9.8, -3140}, {10.2115, 9.8, -3150}, 
        {8.75025, 9.9, -3085}, {9.8972, 9.7, -3090}, 
        {10.0716, 10., -3140}, {8.60449, 10.1, -3162}, 
        {8.41269, 10.1, -3160}, {10.3654, 9.6, -3190},
        {7.93197, 10.1, -3110}, {10.4385, 9.8, -3200}, 
        {7.72951, 9.9, -3010}, {9.9803, 9.8, -3110}, 
        {7.52143, 10.1, -3020}, {7.9252, 9.8, -3010}, 
        {9.82945, 9.7, -3080}, {8.45747, 10., -3119}, 
        {9.97527, 10., -3130}, {9.8482, 10., -3120}, 
        {8.04631, 10., -3090}, {10.3021, 9.7, -3170}, 
        {10.1555, 10.1, -3160}, {9.60075, 9.6, -3040}, 
        {8.66849, 10.1, -3161}, {9.39444, 9.7, -3040}};

which define the following surface

L0 = ListPlot3D[data, InterpolationOrder -> 3, ColorFunction -> "Rainbow", PlotRange -> All]

enter image description here

My question: I want to create three two-dimensional plots showing the projections of the above surface onto the three primary planes (x,y), (x,z), and (y,z).

I still use version 9.

Any suggestions?

Many thanks in advance!

$\endgroup$
  • $\begingroup$ What do you mean by "projection"? your data is not one-to-one so for a given (y,z) pair there are multiple x value with (x,y,z) on the surface. If it weren't the case you could have simply delete coordinates (e.g. to make an x-y projection you just plot data[[All,1;;2]] $\endgroup$ – yohbs May 22 '17 at 17:00
8
$\begingroup$

Adapting the solution from here:

Show[ListPlot3D[data, InterpolationOrder -> 3, ColorFunction -> "Rainbow"] /. 
     Graphics3D[gr_, opts___] :> 
     Graphics3D[{gr, Scale[gr, #, With[{p = Min[#], q = Max[#]}, p - (q - p)/10] & /@ 
                           Transpose[data]] & /@ (1 + 1*^-3 - IdentityMatrix[3])}, opts],
     PlotRange -> All]

shadows


If only the 2D projections are desired, then things are slightly less difficult:

lp = ListPlot3D[data, InterpolationOrder -> 3, ColorFunction -> "Rainbow"];
Table[First @ Cases[lp, GraphicsComplex[pts_, prims_, rest___] :> 
                        Graphics[GraphicsComplex[Drop[pts, None, {3 - k + 1}],
                                                 prims, rest], 
                                 AspectRatio -> {1, 0.4, 0.4}[[k]], Frame -> True], ∞],
      {k, 3}] // GraphicsRow

projections

$\endgroup$
  • $\begingroup$ I would like the projections to be each one to a two-dimensional plot, not in the the same box with the original surface. $\endgroup$ – Vaggelis_Z May 22 '17 at 16:55
  • $\begingroup$ In v9 I get the following error message "An unrecognized option name ("VertexNormals") was encountered while reading a GraphicsComplex." $\endgroup$ – Vaggelis_Z May 22 '17 at 17:21
  • $\begingroup$ ...should've mentioned you were still on version 9 in your question. $\endgroup$ – J. M. will be back soon May 22 '17 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.