Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help plotting 3D data in 2D

  1. Jun 14, 2010 #1
    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.
  2. jcsd
  3. Jun 15, 2010 #2


    User Avatar
    Homework Helper

    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.
  4. Jun 15, 2010 #3
    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]}]]
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook