I am the first time using gnuplot, since I need a 3D-plot with spline
lines, SAS is not performing.
1 line of the datafile is looking as:
1.1 16.02.1977 15JUL1998 3 2
2
2 3 -2 2 3 0 0
2 -2 -2 0 0 -2
0 1
-2 2 0 3 0
0 0
0 2 -2 3 3 2
7
7 7 7 7 6 3 81
4 22 85 95 90 4
0 -3
-3 -3 -3 3 2 2
-.68 1.65
.06 .01 -.09 .91 1.10 .05 .55 .86
and the variables are:
#nummer geboren $11-20 datum $33-41 item1 - item53 faktor1 - faktor7
komp1 - komp3
I want to make a 3D-plot from the variables komp1*komp2=komp3
using my beginner program:
#where nummer == 70_1
#could cut the datas out
splot "DDD.dat" using 66
#64:65:66
t '3D plots'
set border
set bspline
set terminal aixterm1
set output 'd3'
I am getting this error
gnuplot gnu
gnuplot> splot "DDD.dat" using 64:65:66
^
"gnu", line 2: bad data on line 1
aixterm3:/tmp> gnuplot gnu
gnuplot> splot "DDD.dat" using 66
^
"gnu", line 2: bad data on line 1
every help is very appreciated.
Sincerely.
mmb
I tried to reproduce your problem, but couldn't. You're obviously
using an old, outdated version of gnuplot. (That error message is
present in version 3.5, but not in the current one, 3.7.1)
I suggest you try to upgrade to the latest version, and try again.
Some comments regarding your 'beginner program':
The order of operations is wrong. You should 'set' all things, first,
and then 'splot'. 'set bspline' will do you no good in a 3D plot,
which may well mean that gnuplot doesn't solve your original problem,
anyway.
> set terminal aixterm1
This also is incorrect. You want to write 'set terminal x11' or something
similar. See the page output by 'set terminal' alone, for a list of
options.
--
Hans-Bernhard Broeker (bro...@physik.rwth-aachen.de)
Even if all the snow were burnt, ashes would remain.
I could reduce my errors to:
/tmp> gnuplot gnu
Warning: empty y range [0:0], adjusting to [-1:1]
This is occurring with autoscale as well as with set yrange
with a program like:
splot "g701.txt" using 2 with lines #2:3:4 #using 66
#64:65:66
set xrange [-1:1]
set autoscale y
#set yrange [-1:1]
set zrange [-1:1]
set parametric
set xlabel 'komp1' ,1
show xlabel
set ylabel 'komp2' ,1
show ylabel
set zlabel 'komp3' ,1
show zlabel
set title "3D Fluktuationskennwerte von Patient 70_1"
set border
# bspline
#set terminal aixterm3
set output 'g701.gif'
and a matrix, having reduced the old matrix to:
1 0.11 -0.28 -0.03
2 0.25 0.06 0.03
3 -0.73 0.07 -0.46
4 -1.99 0.37 -0.70
5 -1.07 0.15 -0.45
6 -0.10 0.14 -0.45
7 0.59 -0.13 -0.08
8 0.51 0.16 0.10
9 0.27 -0.15 0.07
10 0.47 0.04 0.01
11 0.38 -0.21 0.09
12 -0.78 -0.23 -0.44
13 -1.50 0.31 -0.40
14 0.53 -0.13 0.22
15 0.60 -0.08 0.14
16 0.08 0.29 -0.01
17 0.27 0.04 -0.02
18 -0.10 0.28 -0.60
19 -0.04 0.03 -0.48
20 0.07 -0.38 -0.48
21 0.24 -0.05 -0.48
22 0.59 0.24 0.04
where the interesting variables are variable 2-4.
The produced plot has 0 bytes.
Thanks very much in advance for every response.
Sincerely,
mmb
I could again reduce the errors to:
gnuplot gnu
gnuplot: can't allocate 'sienna'. Using black.
gnuplot: can't allocate 'orange'. Using black.
gnuplot: can't allocate 'coral'. Using black.
having changed my program to:
set parametric
#set xrange [-2:2]
set autoscale
#set yrange [-2:2]
#set zrange [-2:2]
set xlabel "komp1" ,1
#show xlabel
set ylabel "komp2" ,1
#show ylabel
set zlabel "komp3" ,1
#show zlabel
set title "3D Fluktuationskennwerte von Patient 70_1"
set border
splot "g701.txt" with lines
set output 'g701.gif'
having changed the datas to:
0.11 -0.28 -0.03
0.25 0.06 0.03
-0.73 0.07 -0.46
-1.99 0.37 -0.70
-1.07 0.15 -0.45
-0.10 0.14 -0.45
0.59 -0.13 -0.08
0.51 0.16 0.10
0.27 -0.15 0.07
0.47 0.04 0.01
But the .gif still has 0 bytes.
what must I do?
Sincerely,
mmb
> I could again reduce the errors to:
> gnuplot gnu
> gnuplot: can't allocate 'sienna'. Using black.
> gnuplot: can't allocate 'orange'. Using black.
> gnuplot: can't allocate 'coral'. Using black.
These have no strict consequence on plot availability: they're X11
errors. gnuplot failed to allocated colors as it wanted to. This is
usually due to some other program (often netscape) grabbing all of the
palette in 8bit paletted graphics modes.
But you seem to not have found the right combination of 'set terminal'
and 'set output' yet.
Try this sequence, after all other 'set commands':
set terminal gif
set out 'plot.gif'
splot 'datafile' using 1:2:3 with lines
set out
the last one, 'set out' with no other argument, is *necessary*!