|
From: Thomas S. <t.s...@fz...> - 2009-11-23 08:20:58
|
using :(column(i))
chudson wrote:
>
> Hi all.I have a huge problem with setting up a treatment a missing value
> inside a for loop(gnuplot version : 4.3).I need to get a state when a
> missing value is detected, then its skipped on ,not interpolated.I read
> the tip for use the $ inside using part with a number(variable) but it
> doesnt work inside for loop.
> The code:
>
> infile="/home/analiza/webgen/trans_danych/DLM_6m.csv"
> outfile="/home/analiza/webgen/trans_danych/DLM_6m.png"
> column=2
> pictTitle="DLM"
> columnList="DATA WARTOSC CEL_OD CEL_DO "
> objectList=""
> counterList="DATA WARTOSC CEL_OD CEL_DO "
> nColumn=4
> nCounter=4
> nObject=1
> objectId=1
> objectName=""
> set datafile separator ';'
> set decimalsign locale 'slovenian'
> set title "DLM"
> set xtics 1
> set xtics ("2009-04" 0, "2009-05" 1, "2009-06" 2, "2009-07" 3, "2009-08"
> 4, "2009-09" 5, "2009-10" 6, "2009-11" 7, "2009-12" 8)
> set xdata time
> set datafile missing " "
> set timefmt "%Y-%m-%d"
> set format y "%.10g"
> set autoscale x
> set terminal png size 600,450
> set output outfile
> set grid y
> set key under nobox
> set macros
> set datafile missing "NaN"
> ymax = sprintf("\"\`\cat %s |cut -d \"\;\"\ -f2|sort -n -u|head -2|tail
> -1|tr ',' '.'\`\"",infile)
> ymin= sprintf("\"\`\cat %s |cut -d \"\;\"\ -f2|sort -n -u|tail -1|tr ','
> '.'\`\"",infile)
> set yrange[0.999*@ymin:@ymax*1.001]
> set xtics rotate by 90
> plot for [i=2:nColumn] infile every ::1 using :i with linespoints title
> word(counterList,i)
>
> So,my question is how use the variable i to create a state i need.
> Any ideas will be appreciated
>
>
>
--
View this message in context: http://old.nabble.com/Problem-with-correct-treatment-a-missing-value-in-for-loop-tp26473584p26474138.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|