I have two lists of data which I am plotting on two ListLinePlots. I would like to have these two plots appear perpendicular to each other on a 3D graphic. I have tried to do this using a modification to the answers to this question, but I am quite new to Mathematica so I had some trouble converting this into code that works for me.

Is there any way that I can implement this method when the data is lists rather than functions of some variable?

  • 1
    $\begingroup$ please include your code and some sample data. In short, yes, you can do it. The trick is to not plot it as ListLinePlots, but to do a 3D line plot $\endgroup$
    – rm -rf
    Commented Apr 15, 2013 at 23:32

1 Answer 1


When you create a ListLinePlot, you're creating a 2D graphics. What you need to do is to take your 2D list data and plot it in 3D, with an appropriate value chosen for the third coordinate to make them perpendicular. Since you pointed to the EM wave example, I'll demonstrate an example using lists, that partially reproduces my answer there:

data = Table[{x, Sin[x]}, {x, 0, 5 π, π/20}];
        data /. {x_?NumericQ, y_?NumericQ} :> {x, y, 0}, 
        data /. {x_?NumericQ, y_?NumericQ} :> {x, 0, y}
    PlotStyle -> {Blue, Darker@Green}, AxesOrigin -> {0, 0, 0}, 
    Boxed -> False, Ticks -> None, AxesStyle -> LightGray
] /. Point -> Line

enter image description here


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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