|
From: Thomas S. <t.s...@fz...> - 2009-06-03 14:17:56
|
simpler ways - 'outside' gnuplot, maybe, but 'inside', i don't think so,
because you read y-values in, which are then to be used as constant
functions after reading them in, that's somehow a 'misuse' of gnuplots
plotting mechanism.
'outside' gnuplot, e.g.:
load "< awk --field-separator \",\" 'BEGIN {temp = sprintf(\"plot\")} {if
(NR>1) temp = temp \",\" ; temp = temp $2 \" title \" \"\\\"\" $1 \"\\\"\"}
END{print temp}' ts.dat"
Daniel Clemente-2 wrote:
>
>
> Thanks, this exactly parses the file. It will also be a good exercise to
> understand that.
>
> I supposed there would be a simpler way to do this in gnuplot. It is a
> common graph.
>
>> you need gnuplot 4.3-cvs
>>
>> set datafile separator ","
>> t=""
>> plot for [i=0:4] 'ts.dat' us
>> ((i==0&&$0==0)?(b=$2,t=stringcolumn(1)):99 ,
>> $0==0?(a=b):99, $0==(i+1)?(b=$2,t=stringcolumn(1)):99 ,
>> $0):(a) with lines
>> title t
>>
>>
>
>
>
>
>
> ------------------------------------------------------------------------------
> OpenSolaris 2009.06 is a cutting edge operating system for enterprises
> looking to deploy the next generation of Solaris that includes the latest
> innovations from Sun and the OpenSource community. Download a copy and
> enjoy capabilities such as Networking, Storage and Virtualization.
> Go to: http://p.sf.net/sfu/opensolaris-get
> _______________________________________________
> Gnuplot-info mailing list
> Gnu...@li...
> https://lists.sourceforge.net/lists/listinfo/gnuplot-info
>
>
--
View this message in context: http://www.nabble.com/Several-horizontal-lines-tp23804760p23851998.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|