3D plots

As you might have found out, one of the data sets does not provide $ 2$- but $ 3$-dimensional data. Unfortunately, grace is not able to plot $ 3$D so we have to switch back to gnuplot again...

Start gnuplot and use the splot command to plot the data into a $ 3$D coordinate system

gnuplot> splot "datafile"

Like in the previous $ 2$D plot, gnuplot uses + signs to mark your data points. Change that behavior by appending with lines to the splot command again. This will draw a line that connects all data points in the order the data was given. Of course, this might produce ugly looking results, so gnuplot provides you with a way to fit your data points into a grid of given precision. After that procedure you will be able to plot the resulting grid instead of just the data itself.

This is especially useful if you do not have data that is distributed in a grid like way but scattered. Use

gnuplot> set dgrid3d x,y,w
and replace $ x$ with the number of gridpoints in $ x$ direction, $ y$ with the number of gridpoints in y direction and $ w$ with a weighting factor ($ 1,2,4,8$). The weighting factor $ w$ influences the degree of weighting of the given $ z$ value. Each $ z$ value is weighted inversely by the distance from the gridpoints raised to the power of the weighting factor (norm). The parameter $ w$ may be omitted. Default values are $ x=y=10$ and $ w=1$. See also
gnuplot> help dgrid3d

After setting a reasonable grid, type

gnuplot> replot
to plot the data last used again.

Try different grid sizes and weighting norms to investigate their influence on the data.



Subsections
Ronny Lorenz 2010-04-06