On Mon, 3 May 2010 17:56:55 +0200
Sabari <sa...@gm...> wrote:
> Hai all
>
> How to plot 3D contour with surface plot. i have 4 column data a,b,c,z (z=
> amplitude of intensity)
> for example
>
> a b c z
>
> 1 0 0 1
> 2 0 0 5
> ,,,
> 10 0 0 1
>
> 1 1 0 2
> 2 1 0 6
> ,,,,
> 10 1 0 5
> ,,,,,,,,,,
> ,,,,,,,,,
>
> 1 10 0 5
>
> ,,,,,,,,,
> ,,,,,,,,,
>
> 10 10 10 14
>
> With regards
> sabarinathan.v
If you the meaning of you a, b, c and z coordinates are as follows:
a - x-coordinate on the plot;
b - y-coordinate;
c - z-coordinate;
z - colour of the plot;
Than maybe you should just try something as simple as:
splot "data.txt" with pm3d
Or the same thing in a form of terminal command line:
gnuplot -persist -e 'splot "data.txt" with pm3d'
The only thing you should notice is that your data must have some
king of "breaks" when your x-coordinate changes (or maybe y-coordinate
- I haven't checked). for example:
data.txt:
1 1 0 9
1 1 1 10
1 1 2 11
1 1 3 12
1 2 0 13
1 2 1 14
1 2 2 15
1 2 3 16
1 3 0 17
1 3 1 18
1 3 2 19
1 3 3 20
2 1 0 21
2 1 1 22
2 1 2 23
2 1 3 24
2 2 0 25
2 2 1 26
2 2 2 27
2 2 2 28
2 3 0 29
2 3 1 30
2 3 2 31
2 3 3 32
3 1 0 33
3 1 1 34
3 1 2 35
3 1 3 36
3 2 0 37
3 2 1 38
3 2 2 39
3 2 3 40
3 3 0 41
3 3 1 42
3 3 2 43
3 3 3 44
These breaks are necessary to build a correct 3D surface plot.
Hope, this will help you. :)
-----
<v_...@uk...>
|