How to plot 3D data in 2D using Mathematica?

Click For Summary
To represent 3D data in a 2D graph using Mathematica, one effective approach is to utilize functions that allow for the visualization of three-dimensional data by fixing one variable and creating a series of 2D plots. This method can involve using color to represent the third dimension, enhancing the visual representation. A sample code snippet demonstrates how to plot points in 2D while varying the third dimension's representation through color coding. This technique can effectively convey complex data sets in a more accessible format.
SrEstroncio
Messages
60
Reaction score
0
Hello. I was asked to import a number of data to mathematica from an output file for wien2k (based in fortran). The thing is, I have to draw a graph that considers a matrix full of data in three dimensions, but the graph itself should only have two parameters. To sum up: how to represent 3D data in 2D?
Also, I barely use mathematica. Help lol.
 
Physics news on Phys.org
Maybe you should be more specific about your data. If you can find a function which it fits into, then you could represent your 3D graph of this function as a set of 2D graphs, each of which contains one of its variables as a constant.
 
Depending on your data, you might be able to use color to indicate the 3rd dimension.

sampledata = Table[{t Cos[t], t Sin[t], t/4}, {t, 0, 2Pi, Pi/8}];

Show[Graphics[{PointSize[0.05], Map[{Hue[Last[#]/2], Point[Drop[#, -1]]} &, sampledata]}]]
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
14K
  • · Replies 7 ·
Replies
7
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
2
Views
2K