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

  • Context: Mathematica 
  • Thread starter Thread starter SrEstroncio
  • Start date Start date
  • Tags Tags
    2d 3d Data Plotting
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 5K views
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]}]]