J'ai les données suivantes:gnuplot - couleurs conditionnelles dans un terrain de points
ClockIndex Max AvgStd Avg Num Threshold
"ck1 (1.54 GHz)" 35 +16.30 11 11583 X
"ck2 (1.54 GHz)" 28 +16.66 12 10669 -
"ck3 (1.54 GHz)" 29 +14.47 9 8036 -
"ck4 (1.54 GHz)" 35 +18.99 12 5685 -
"ck5 (1.54 GHz)" 9 +6.04 3 11 -
Je complotant les colonnes 2, 3, 4 ensemble dans un terrain de points, une ligne par entrée.
En utilisant ce code:
set xtics rotate
set xlabel ""
set ylabel "Levels"
set title "Levels - foo"
set key autotitle columnhead
set term png medium size 1200,600
set grid
set output "foo.png"
plot "foo.rpt" using 2:xticlabels(1) with points pt 13 ps 2 lt rgb "blue",\
"" using 3:xticlabels(1) with points pt 13 ps 2 lt rgb "red",\
"" using 4:xticlabels(1) with points pt 13 ps 2 lt rgb "black
** But: S'il y a un "X" dans la colonne "Seuil", je veux le point d'être vert "Max", pas bleu.
J'ai essayé d'utiliser awk, mais en vain.
plot "< awk '{if($6 == \"X\") print }' foo.rpt" using 2:xticlabels(1) with points pt 13 ps 2 lt rgb "blue",\
"" using 3:xticlabels(1) with points pt 13 ps 2 lt rgb "red",\
"" using 4:xticlabels(1) with points pt 13 ps 2 lt rgb "black"
"< awk '{if($6 == \"-\") print }' foo.rpt" using 2:xticlabels(1) with points pt 13 ps 2 lt rgb "green",\
"" using 3:xticlabels(1) with points pt 13 ps 2 lt rgb "red",\
"" using 4:xticlabels(1) with points pt 13 ps 2 lt rgb "black"
Je continue de recevoir des erreurs comme:
"foo_gnuplot", line 11: warning: Skipping data file with no valid points
Toute aide serait grandement appréciée! Merci beaucoup d'avoir jeté un coup d'oeil! :)
Merci beaucoup, j'apprécie l'aide! – user5150183
Avec les mêmes données et la même commande plot? – havogt
Et ça a bien fonctionné, merci beaucoup! – user5150183