I am just starting to learn Mathematica and I was trying to get projection of the list of points in ListPointPlot3D. I read about ViewPoint option. It shows the axes I need but doesn't show the points projected. What might the problem be?

Thank you.

list1 := {{1, 1, 1}, {1, 2, 2}, {1, 3, 1}, {1, 4, 2}, {2, 1, 1}, {2, 
 2, 1}, {2, 3, 3}, {2, 4, 3}, {3, 1, 1}, {3, 2, 2}, {3, 3, 3}, {3, 
 4, 4}}

Show[ListPointPlot3D[list1, Filling -> Axis, 
PlotStyle -> PointSize[Large], 
PlotRange -> {{0, 5}, {0, 5}, {0, 5}}, AxesLabel -> {D, Q, X}, 
PlotTheme -> "Marketing"], ViewPoint -> {0, \[Infinity], 0}]

UPDATE: Added list var.

The 3d plot looks like this

enter image description here

And I want to get projection that looks like this

enter image description here

  • Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 Dec 8 '14 at 0:16
  • Looks ok. But without knowing what list1 is, it's hard to say what the problem might be. Can you include it or code to generate it? – Michael E2 Dec 8 '14 at 0:19
  • @MichaelE2 Added list values. They are static. And added some images to ilustrate what I want to achieve. – Vlad Melnychenko Dec 8 '14 at 8:11
  • Your code produces this Mathematica graphics for me. If I use ViewPoint -> {0, -\[Infinity], 0}, I get this Mathematica graphics instead -- is that what you want? – Michael E2 Dec 8 '14 at 11:05
  • Wow, wasn't aware of PlotTheme->Marketing. Would not have imagined that someone needs something like that. Anyway, why don't you just use a 3 by 2 Matrix to project your data and use the 2D plot (with PlotTheme->Marketing of course). Then you don't need to worry about lighting. – mikuszefski Dec 8 '14 at 13:50
up vote 2 down vote accepted

To get the right view point, one needs -∞ in place of . And just to be safe, I would set ViewVertical explicitly and use Deploy to prevent manual/mouse rotation of the graphics.

list1 = {{1, 1, 1}, {1, 2, 2}, {1, 3, 1}, {1, 4, 2}, {2, 1, 1}, {2, 2, 1},
         {2, 3, 3}, {2, 4, 3}, {3, 1, 1}, {3, 2, 2}, {3, 3, 3}, {3, 4, 4}};

Deploy@ListPointPlot3D[list1, Filling -> Axis, 
  PlotStyle -> PointSize[Large], 
  PlotRange -> {{0, 5}, {0, 5}, {0, 5}}, AxesLabel -> {D, Q, X}, 
  PlotTheme -> "Marketing", ViewPoint -> {0, -∞, 0}, 
  ViewVertical -> {0, 0, 1}]

Mathematica graphics

You can also get a similar image with 2D graphics, dropping the second coordinate with list1[[All, {1, 3}]]:

ListPlot[list1[[All, {1, 3}]], Filling -> Axis, 
 PlotStyle -> PointSize[Large], PlotRange -> {{0, 5}, {0, 5}}, 
 PlotTheme -> "Marketing", FrameLabel -> {D, X}]

Mathematica graphics

t = Table[{i, Cos[i], Sin[i]}, {i, 0, 20, .1}];
f[l_, v_] := (v #) & /@ l
ListPointPlot3D[{t, f[t, {1, 1, 0} ], f[t, {1, 0, 1} ], f[t, {0, 1, 1} ]}, Filling -> Axis]

Mathematica graphics

GraphicsRow[ListPointPlot3D[{t, f[t, # ]}] & /@ Permutations[{1, 1, 0}]]

Mathematica graphics

  • Thanks you for the reply. Sorry for lack of the information in my question. I added an image of the projection I want to get. – Vlad Melnychenko Dec 8 '14 at 8:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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