Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
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 – R. M. Apr 15 '13 at 23:32
up vote 7 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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