Я здесь новый и немного с Gnuplot.Gnuplot, условный векторный стиль дает ошибку
У меня есть следующие данные, текстовый файл, разделенный запятой;
1386708463,830
1386708473,830
1386708484,830
1386708497,-830
1386708508,-830
1386708518,-840
1386708528,-840
1386708538,-840
1386708686,-950
1386708696,-960
1386708706,-960
1386708716,-940
1386708726,-940
Когда значение в столбце 2 отрицательное, цвет должен быть красного цвета, иначе зеленого.
Я пробовал с;
plot "< tail -10 meterstanden.txt" using (-100):1:2:0 title "", \
"< tail -11 meterstanden.txt" using (0):1:($2>0 ? $2:0/0):(0) title "Watt/uur " with vectors arrowstyle 2, \
"< tail -11 meterstanden.txt" using (0):1:($2<=0 ? $2:0/0):(0) title "Watt/uur " with vectors arrowstyle 1, \
"< tail -11 meterstanden.txt" using 2:1:2 with labels font "arial, 8" offset 1.5,0.4
Но я получаю сообщение об ошибке;
plot "< tail -10 meterstanden.txt" using (-100):1:2:0 title "", "< tail -11 meterstanden.txt" using (0):1:($2>0 ? $2:0/0):(0) title "Watt/uur " with vectors arrowstyle 2, "< tail -11 meterstanden.txt" using (0):1:($2<=0 ? $2:0/0):(0) title "Watt/uur " with vectors arrowstyle 1, "< tail -11 meterstanden.txt" using 2:1:2 with labels font "arial, 8" offset 1.5,0.4
^
"figure02_temp.plt", line 37: warning: Skipping data file with no valid points
Я не могу понять, в чем проблема, что я не так?
(извините за мой плохой Englisch)
Баки для своего времени, он был частью е сценария.
Полный сценарий;
set output "gnu.png"
set datafile separator ","
set style arrow 1 lw 3 lc rgb "#ff0000"
set style arrow 2 lw 3 lc rgb "#008000"
set style arrow 1 head size screen 0.02,90 # 0.02 is de breedte van het streepje, 90 is een platte streep.
set style arrow 2 head size screen 0.02,90 # 0.02 is de breedte van het streepje, 90 is een platte streep.
set linetype 1 lw 1 pointtype 0 lc rgb"#ff0000"
set bmargin 4 # witruimte onder grafiek
set label font "arial, 8" # grootte font tbv labels in het grafiek
set terminal png notransparent truecolor enhanced
set term png size 500, 450 background rgb "#ffffff"
set ydata time
set timefmt "%s"
set format y "%H:%M:%S" # dit is de opmaak zoals je hem gaat zien
#set key outside bot center
#set key maxrows 1 # aantal regels onder het grafiek (met Watt/uur erin)
set title "Energiestroom" font "arial bold, 14"
set xtics font "arial, 10"
set ytics font "arial, 10"
set ylabel "T i j d - a s" offset 3,1 font "helvetica bold, 14"
set xlabel "W a t t/u u r" offset 0,0.5 font "arial bold, 14"
set grid xtics lc rgb "#dddddd" linewidth 2 lt 1
set grid ytics
set boxwidth 10
set style fill transparent solid 1
unset key
plot "< tail -10 meterstanden.csv" u (-100):1:2:0 title "", \
"< tail -8 meterstanden.csv" u (0):1:($2<0 ?$2:0/0):(0) notitle with vectors arrowstyle 1, \
"< tail -8 meterstanden.csv" u (0):1:($2>0 ?$2:0/0):(0) notitle with vectors arrowstyle 1, \
"< tail -8 meterstanden.csv" u 2:1:2 with labels font "arial, 8" offset 1.5,0.4
Участок; http://ccvd.eu/downloads/gnu.png
И после участка я получаю сообщение об ошибке.
Я ОЧЕНЬ рад вашему решению. Linux дает мне почту, когда Gnuplot дает проблемы. И вот теперь, спасибо. Большое спасибо.
И здесь результаты, горизонтальная «гистограмма». , , с красным и зеленым. http://ccvd.eu/downloads/gnu1.png
Снова очень, очень спасибо.
добро пожаловать, Con.