I can't get pm3d graphs to work using "splot <file> using" or using "Splot <file>. I get blank graphs. They do work if I use splot <file> matrix or if I use a math function.
The files must be being parsed, as the axis and the cbrange get set to the max data values in the file. I have tried a large number of variants on the following.
set title 'Traffic By Source Network (30s Avg)'
set term post color
#set view map
#set samples 1000, 1000
#set isosamples 1000, 1000
#unset surface
set style data pm3d
set style function pm3d
set border 4095 lt -1 lw 1.000
#set hidden3d offset 1 trianglepattern 3 undefined 1 altdiagonal bentover
set ticslevel 0
set palette positive nops_allcF maxcolors 255 gamma 1.5 color model RGB
set xlabel "Subnet"
#set xrange [ 0 : 18 ] noreverse nowriteback
set ylabel "Time"
#set yrange [ 0 : 24 ] nowriteback
#set y2range [ * : * ] reverse nowriteback
#set ydata time
#set timefmt "%Y-%m-%d_%H:%M:%S"
#set format y "%H:%M %m/%d"
#set zrange [ 0 : 10 ] noreverse nowriteback
#set cbrange [ 0.0 : 10.0 ]
set pm3d at s
splot "tdd.txt"
[Please try not to post such long datafiles to the forum...]
The problem is clearly with the datafile. There are too many blank lines in it. Separate each individual sequence of measurements by only *one* blank line, instead of 4, and you'll get a mesh data file that gnuplot can display as a closed surface.
For a plot with only one dataset, I would generally advise against "set style data" or "set style function" --- just use the 'with' argument to (s)plot instead.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You were right. I had stuck the extra blank lines in after trying lots of other thing and desperation had set in. An example I found on the web had had multiple blank lines in it, so I tried 2, then 3, then 4. It never worked. I forgot to remove them when trying other things. The examples blank lines were probably just formatting on the web page.
The graph produced by 4.0 isn't correct though. The right hand end looks to be cut off. It was correctly drawn in a csv build of 4.1.
I still can't get the "splot file using" syntax to work. It does "w impulses", but I get a blank graph "w pm3d".
i.e.
Fails:
splot "testdata.txt" using 1:(1):2 w pm3d, "testdata.txt" using 1:(2):3 w pm3d, "testdata.txt" using 1:(3):4 w pm3d, "testdata.txt" using 1:(4):5 w pm3d, "testdata.txt" using 1:(5):6 w pm3d, "testdata.txt" using 1:(6):7 w pm3d, "testdata.txt" using 1:(7):8 w pm3d, "testdata.txt" using 1:(8):9 w pm3d, "testdata.txt" using 1:(9):10 w pm3d, "testdata.txt" using 1:(10):11 w pm3d, "testdata.txt" using 1:(11):12 w pm3d, "testdata.txt" using 1:(12):13 w pm3d, "testdata.txt" using 1:(13):14 w pm3d, "testdata.txt" using 1:(14):15 w pm3d, "testdata.txt" using 1:(15):16 w pm3d, "testdata.txt" using 1:(16):17 w pm3d
Works:
splot "testdata.txt" using 1:(1):2 w impulses, "testdata.txt" using 1:(2):3 w impulses, "testdata.txt" using 1:(3):4 w impulses, "testdata.txt" using 1:(4):5 w impulses, "testdata.txt" using 1:(5):6 w impulses, "testdata.txt" using 1:(6):7 w impulses, "testdata.txt" using 1:(7):8 w impulses, "testdata.txt" using 1:(8):9 w impulses, "testdata.txt" using 1:(9):10 w impulses, "testdata.txt" using 1:(10):11 w impulses, "testdata.txt" using 1:(11):12 w impulses, "testdata.txt" using 1:(12):13 w impulses, "testdata.txt" using 1:(13):14 w impulses, "testdata.txt" using 1:(14):15 w impulses, "testdata.txt" using 1:(15):16 w impulses, "testdata.txt" using 1:(16):17 w impulses
You're talking about a rather completely different datafile now. This is (almost) a 'matrix' format file, and no, your method of reading it a dozen times will not get you the same effect as reading it once with the proper "matrix" option (after removing the 1st column).
The datafile you showed before should have worked if you pare it down to single empty lines separating each line of constant y. If there's a problem with that, please post a bug report for that and attach a (small as possible) version of the data file to that report. And try to describe more precisely than "looksto be cut off".
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't get pm3d graphs to work using "splot <file> using" or using "Splot <file>. I get blank graphs. They do work if I use splot <file> matrix or if I use a math function.
The files must be being parsed, as the axis and the cbrange get set to the max data values in the file. I have tried a large number of variants on the following.
set title 'Traffic By Source Network (30s Avg)'
set term post color
#set view map
#set samples 1000, 1000
#set isosamples 1000, 1000
#unset surface
set style data pm3d
set style function pm3d
set border 4095 lt -1 lw 1.000
#set hidden3d offset 1 trianglepattern 3 undefined 1 altdiagonal bentover
set ticslevel 0
set palette positive nops_allcF maxcolors 255 gamma 1.5 color model RGB
set xlabel "Subnet"
#set xrange [ 0 : 18 ] noreverse nowriteback
set ylabel "Time"
#set yrange [ 0 : 24 ] nowriteback
#set y2range [ * : * ] reverse nowriteback
#set ydata time
#set timefmt "%Y-%m-%d_%H:%M:%S"
#set format y "%H:%M %m/%d"
#set zrange [ 0 : 10 ] noreverse nowriteback
#set cbrange [ 0.0 : 10.0 ]
set pm3d at s
splot "tdd.txt"
tdd.txt is
1 1 1
1 2 1
1 3 1
1 4 1
1 5 1
1 6 1
1 7 1
1 8 1
1 9 1
1 10 1
1 11 1
1 12 1
1 13 1
1 14 1
1 15 1
1 16 1
2 1 1
2 2 2
2 3 2
2 4 2
2 5 2
2 6 2
2 7 2
2 8 2
2 9 2
2 10 2
2 11 2
2 12 2
2 13 2
2 14 2
2 15 2
2 16 1
3 1 1
3 2 2
3 3 3
3 4 3
3 5 3
3 6 3
3 7 3
3 8 3
3 9 3
3 10 3
3 11 3
3 12 3
3 13 3
3 14 3
3 15 2
3 16 1
4 1 1
4 2 2
4 3 3
4 4 4
4 5 4
4 6 4
4 7 4
4 8 4
4 9 4
4 10 4
4 11 4
4 12 4
4 13 4
4 14 3
4 15 2
4 16 1
5 1 1
5 2 2
5 3 3
5 4 4
5 5 5
5 6 5
5 7 5
5 8 5
5 9 5
5 10 5
5 11 5
5 12 5
5 13 4
5 14 3
5 15 2
5 16 1
6 1 1
6 2 2
6 3 3
6 4 4
6 5 5
6 6 6
6 7 6
6 8 6
6 9 6
6 10 6
6 11 6
6 12 5
6 13 4
6 14 3
6 15 2
6 16 1
7 1 1
7 2 2
7 3 3
7 4 4
7 5 5
7 6 6
7 7 7
7 8 7
7 9 7
7 10 7
7 11 6
7 12 5
7 13 4
7 14 3
7 15 2
7 16 1
8 1 1
8 2 2
8 3 3
8 4 4
8 5 5
8 6 6
8 7 7
8 8 8
8 9 8
8 10 7
8 11 6
8 12 5
8 13 4
8 14 3
8 15 2
8 16 1
9 1 1
9 2 2
9 3 3
9 4 4
9 5 5
9 6 6
9 7 7
9 8 8
9 9 8
9 10 7
9 11 6
9 12 5
9 13 4
9 14 3
9 15 2
9 16 1
10 1 1
10 2 2
10 3 3
10 4 4
10 5 5
10 6 6
10 7 7
10 8 8
10 9 8
10 10 7
10 11 6
10 12 5
10 13 4
10 14 3
10 15 2
10 16 1
11 1 1
11 2 2
11 3 3
11 4 4
11 5 5
11 6 6
11 7 7
11 8 8
11 9 8
11 10 7
11 11 6
11 12 5
11 13 4
11 14 3
11 15 2
11 16 1
12 1 1
12 2 2
12 3 3
12 4 4
12 5 5
12 6 6
12 7 7
12 8 8
12 9 8
12 10 7
12 11 6
12 12 5
12 13 4
12 14 3
12 15 2
12 16 1
13 1 1
13 2 2
13 3 3
13 4 4
13 5 5
13 6 6
13 7 7
13 8 8
13 9 8
13 10 7
13 11 6
13 12 5
13 13 4
13 14 3
13 15 2
13 16 1
14 1 1
14 2 2
14 3 3
14 4 4
14 5 5
14 6 6
14 7 7
14 8 8
14 9 8
14 10 7
14 11 6
14 12 5
14 13 4
14 14 3
14 15 2
14 16 1
15 1 1
15 2 2
15 3 3
15 4 4
15 5 5
15 6 6
15 7 7
15 8 8
15 9 8
15 10 7
15 11 6
15 12 5
15 13 4
15 14 3
15 15 2
15 16 1
16 1 1
16 2 2
16 3 3
16 4 4
16 5 5
16 6 6
16 7 7
16 8 8
16 9 8
16 10 7
16 11 6
16 12 5
16 13 4
16 14 3
16 15 2
16 16 1
17 1 1
17 2 2
17 3 3
17 4 4
17 5 5
17 6 6
17 7 7
17 8 8
17 9 8
17 10 7
17 11 6
17 12 5
17 13 4
17 14 3
17 15 2
17 16 1
18 1 1
18 2 2
18 3 3
18 4 4
18 5 5
18 6 6
18 7 7
18 8 7
18 9 7
18 10 7
18 11 6
18 12 5
18 13 4
18 14 3
18 15 2
18 16 1
19 1 1
19 2 2
19 3 3
19 4 4
19 5 5
19 6 6
19 7 6
19 8 6
19 9 6
19 10 6
19 11 6
19 12 5
19 13 4
19 14 3
19 15 2
19 16 1
20 1 1
20 2 2
20 3 3
20 4 4
20 5 5
20 6 5
20 7 5
20 8 5
20 9 5
20 10 5
20 11 5
20 12 5
20 13 4
20 14 3
20 15 2
20 16 1
21 1 1
21 2 2
21 3 3
21 4 4
21 5 4
21 6 4
21 7 4
21 8 4
21 9 4
21 10 4
21 11 4
21 12 4
21 13 4
21 14 3
21 15 2
21 16 1
22 1 1
22 2 2
22 3 3
22 4 3
22 5 3
22 6 3
22 7 3
22 8 3
22 9 3
22 10 3
22 11 3
22 12 3
22 13 3
22 14 3
22 15 2
22 16 1
23 1 1
23 2 2
23 3 2
23 4 2
23 5 2
23 6 2
23 7 2
23 8 2
23 9 2
23 10 2
23 11 2
23 12 2
23 13 2
23 14 2
23 15 2
23 16 1
24 1 1
24 2 1
24 3 1
24 4 1
24 5 1
24 6 1
24 7 1
24 8 1
24 9 1
24 10 1
24 11 1
24 12 1
24 13 1
24 14 1
24 15 1
24 16 1
[Please try not to post such long datafiles to the forum...]
The problem is clearly with the datafile. There are too many blank lines in it. Separate each individual sequence of measurements by only *one* blank line, instead of 4, and you'll get a mesh data file that gnuplot can display as a closed surface.
For a plot with only one dataset, I would generally advise against "set style data" or "set style function" --- just use the 'with' argument to (s)plot instead.
You were right. I had stuck the extra blank lines in after trying lots of other thing and desperation had set in. An example I found on the web had had multiple blank lines in it, so I tried 2, then 3, then 4. It never worked. I forgot to remove them when trying other things. The examples blank lines were probably just formatting on the web page.
The graph produced by 4.0 isn't correct though. The right hand end looks to be cut off. It was correctly drawn in a csv build of 4.1.
I still can't get the "splot file using" syntax to work. It does "w impulses", but I get a blank graph "w pm3d".
i.e.
Fails:
splot "testdata.txt" using 1:(1):2 w pm3d, "testdata.txt" using 1:(2):3 w pm3d, "testdata.txt" using 1:(3):4 w pm3d, "testdata.txt" using 1:(4):5 w pm3d, "testdata.txt" using 1:(5):6 w pm3d, "testdata.txt" using 1:(6):7 w pm3d, "testdata.txt" using 1:(7):8 w pm3d, "testdata.txt" using 1:(8):9 w pm3d, "testdata.txt" using 1:(9):10 w pm3d, "testdata.txt" using 1:(10):11 w pm3d, "testdata.txt" using 1:(11):12 w pm3d, "testdata.txt" using 1:(12):13 w pm3d, "testdata.txt" using 1:(13):14 w pm3d, "testdata.txt" using 1:(14):15 w pm3d, "testdata.txt" using 1:(15):16 w pm3d, "testdata.txt" using 1:(16):17 w pm3d
Works:
splot "testdata.txt" using 1:(1):2 w impulses, "testdata.txt" using 1:(2):3 w impulses, "testdata.txt" using 1:(3):4 w impulses, "testdata.txt" using 1:(4):5 w impulses, "testdata.txt" using 1:(5):6 w impulses, "testdata.txt" using 1:(6):7 w impulses, "testdata.txt" using 1:(7):8 w impulses, "testdata.txt" using 1:(8):9 w impulses, "testdata.txt" using 1:(9):10 w impulses, "testdata.txt" using 1:(10):11 w impulses, "testdata.txt" using 1:(11):12 w impulses, "testdata.txt" using 1:(12):13 w impulses, "testdata.txt" using 1:(13):14 w impulses, "testdata.txt" using 1:(14):15 w impulses, "testdata.txt" using 1:(15):16 w impulses, "testdata.txt" using 1:(16):17 w impulses
Dataset:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
3 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1
4 1 2 3 4 4 4 4 4 4 4 4 4 4 3 2 1
5 1 2 3 4 5 5 5 5 5 5 5 5 4 3 2 1
6 1 2 3 4 5 6 6 6 6 6 6 5 4 3 2 1
7 1 2 3 4 5 6 7 7 7 7 6 5 4 3 2 1
8 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
9 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
10 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
11 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
12 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
13 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
14 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
15 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
16 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
17 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
18 1 2 3 4 5 6 7 7 7 7 6 5 4 3 2 1
19 1 2 3 4 5 6 6 6 6 6 6 5 4 3 2 1
20 1 2 3 4 5 5 5 5 5 5 5 5 4 3 2 1
21 1 2 3 4 4 4 4 4 4 4 4 4 4 3 2 1
22 1 2 3 3 3 3 3 3 3 3 3 3 3 3 2 1
23 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1
24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
You're talking about a rather completely different datafile now. This is (almost) a 'matrix' format file, and no, your method of reading it a dozen times will not get you the same effect as reading it once with the proper "matrix" option (after removing the 1st column).
The datafile you showed before should have worked if you pare it down to single empty lines separating each line of constant y. If there's a problem with that, please post a bug report for that and attach a (small as possible) version of the data file to that report. And try to describe more precisely than "looksto be cut off".