|
From: theozh <th...@gm...> - 2018-10-28 22:19:30
|
ok... you can get get the number of columns via stats $Data and STATS_columns.
The following code does what I intended to do.
(as long as there is only one headerline...)
### gnuplot code
reset session
$Data <<EOD
xxxx ColA ColB ColC ColD
Row1 1.10 1.20 1.30 1.40
Row2 2.10 2.20 2.30 2.40
Row3 3.10 3.20 3.30 3.40
Row4 4.10 4.20 4.30 4.40
EOD
stats $Data u 0 nooutput
ColCount = STATS_columns
RowCount = STATS_records
set xrange[-0.5:ColCount-1.5]
set yrange[-0.5:RowCount-1.5]
plot for [j=2:ColCount] \
$Data using (j-2) \
: ($0-1) \
: (column(j)/10.) \
: ytic(1) \
: xtic(columnhead(j)) with circles notitle,\
for [j=2:ColCount] \
$Data using (j-2):($0-1):(stringcolumn(j)) with labels notitle
### end code
|