# 3D plotting in Ubuntu

I have Ubuntu 10.10 installed and need to plot 3D graphic.

I have installed several free applications available in the repository, like QtiPlot and GNU Octave. I have found out and created the following graphic.

Now I have to show in the same graphic the position of my experiment results, which consist of elements with three parameters: X, Y and Z coordinates which had been calculated with the same function as above graphic.

Any idea to do that? Would be better if you propose solution in free apps, because there are several proprietary apps like Maple or MATLAB.

UPDATE 1

The final result should be more or less like this:

-

You can use `gnuplot` to create vector 3D graphs. Here is one example taken from the 3D surface demos from gnuplot 4.6:

With the corresponding script to generate the plot:

``````#
# \$Id: surface1.dem,v 1.11 2004/09/17 05:01:12 sfeam Exp \$
#
set samples 21
set isosample 11
set xlabel "X axis" offset -3,-2
set ylabel "Y axis" offset 3,-2
set zlabel "Z axis" offset -5
set title "3D gnuplot demo"
set label 1 "This is the surface boundary" at -10,-5,150 center
set arrow 1 from -10,-5,120 to -10,0,0 nohead
set arrow 2 from -10,-5,120 to 10,0,0 nohead
set arrow 3 from -10,-5,120 to 0,10,0 nohead
set arrow 4 from -10,-5,120 to 0,-10,0 nohead
set xrange [-10:10]
set yrange [-10:10]
splot x*y
``````

If you look through the `gnuplot` documentation, there are a few ways to draw spheres as well.

-

There is `PLplot` at sourceforge.
Here is a Lucid reference.
I have not used it and have not checked `Maverick` stability.

-

Look at matplotlib from sourceforge.
There is a simple 3D plotting extension -- `mplot3d`.

The mplot3d toolkit adds simple 3d plotting capabilities to matplotlib by supplying an axis object that can create a 2d projection of a 3d scene. In the end it produces a list of 2d lines and patches that are drawn by the normal matplotlib code. Therefore the resulting graph will have the same look and feel as regular 2d plots.

You can check some samples at that link to see if it works for you.

-