|
From: l_johan_k <l_j...@ho...> - 2008-10-15 09:20:22
|
Hej!
I want to graph a surface in gnuplot of the following matrix:
0 0 0 0 0 0
0 0.00641154 0.01751273 0.01554609 0.00609739 0
0 -3.502E-05 0.009302 0.02995384 0.01733484 0
0 0.02041813 0.03013938 -0.17901065 -0.18546722 0
0 0.00014728 0.00946959 0.03005793 0.01772059 0
0 0 0 0 0 0
I use the following settings:
unset surface
set terminal windows color enhanced
set ticslevel 0
set xtics(" " 0, "1" 1, "2" 2, "3" 3, "4" 4, " " 5)
set ytics(" " 0, "1" 1, "2" 2, "3" 3, "4" 4, " " 5)
set grid
set dgrid3d 70,70
set pm3d
splot "filname.txt" matrix
(filename.txt = matrix)
The problem is that the plot doesn't show the correct values.
Anyone who can help me?
Best wishes,
l_johan_k
--
View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p19970779.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: Thomas S. <t.s...@fz...> - 2008-10-15 09:02:04
|
with 'set dgrid3d 70,70' you are interpolating over the matrix
with an inappropriate grid.
the arguments to 'set dgrid3d' should be:
n * (number_of_xdata - 1) + 1
n * (number_of_ydata - 1) + 1
otherwise your interpolation grid will not contain the data points
you have given.
> I want to graph a surface in gnuplot of the following matrix:
>
> 0 0 0 0 0 0
> 0 0.00641154 0.01751273 0.01554609 0.00609739 0
> 0 -3.502E-05 0.009302 0.02995384 0.01733484 0
> 0 0.02041813 0.03013938 -0.17901065 -0.18546722 0
> 0 0.00014728 0.00946959 0.03005793 0.01772059 0
> 0 0 0 0 0 0
>
> I use the following settings:
>
> unset surface
> set terminal windows color enhanced
> set ticslevel 0
> set xtics(" " 0, "1" 1, "2" 2, "3" 3, "4" 4, " " 5)
> set ytics(" " 0, "1" 1, "2" 2, "3" 3, "4" 4, " " 5)
> set grid
> set dgrid3d 70,70
> set pm3d
> splot "filname.txt" matrix
>
> (filename.txt = matrix)
>
> The problem is that the plot doesn't show the correct values.
--
View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p19989477.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: l_johan_k <l_j...@ho...> - 2008-10-15 17:32:10
|
Thomas, many thanks! Now its working. One more question... Since my graph consists of discrete points I would like to have a flat surface between the values (preferably in the xy-plane). Is this possible? (I.e. I would like to have a "cone" for each matrix element, but with a flat surface between the elements.) Its hard to explain... /Johan -- View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p19998340.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2008-10-15 18:58:44
|
> One more question... > > Since my graph consists of discrete points I would like to > have a flat surface between the values (preferably in the > xy-plane). Is this possible? > > (I.e. I would like to have a "cone" for each matrix element, > but with a flat surface between the elements.) > > Its hard to explain... you are looking for a 3d bar chart or lego plot. well, that's not possible, AFAIK, but a poor man's solution would be: you may use impulses: splot "filename.dat" matrix w imp lw 5 to have a surface at z=0: set iso 6,6 splot "filename.dat" matrix w imp lw 5, 0 or set iso 6,6 splot "filename.dat" matrix us 1:2:($3<0?$3:0) w imp lc 3 lw 10, 0, "" matrix us 1:2:($3>0?$3:0) w imp lc 1 lw 10 -- View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p19999992.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: l_johan_k <l_j...@ho...> - 2008-10-16 08:14:29
|
Thanks for the help! Two more questions... Is it possible to get a z-scale where "-" is "up"? Does anyone have a nice palette? I usually use the "standard" or "set palette defined (-3 "blue", 0 "white", 1 "red")"? /Johan -- View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p20009089.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Thomas S. <t.s...@fz...> - 2008-10-17 09:17:17
|
> Thanks for the help! > > Two more questions... > > Is it possible to get a z-scale where "-" is "up"? set zrange [*:*] reverse > Does anyone have a nice palette? I usually use the > "standard" or "set palette defined (-3 "blue", 0 "white", 1 "red")"? have a look at 'help palette' and then see what the actual palette looks like with 'test palette'. -- View this message in context: http://www.nabble.com/Problem-with-splot-tp19970779p20029493.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |