adding data

adding data

Post by Dirk Geye » Fri, 25 Jul 2003 00:23:17



Hi all,

is there a possibility to add ( or perform another operation) in gnuplot
directly with data from different data files ?

An example :

file :
test1.dat
1  4
2  5
3  8

test2.dat
1  3
2  5
3  9

What I would like to do is to add the second column of the file
'test1.dat' and 'test2.dat'

plot [:][:]\
'test1.dat' u 1:2 t "test 1" w l 1,\
'test2.dat' u 1:2 t "test 2" w l 2,\
sum of test1+test2           w l 3

Naturally, the third line is just a synonyme for the operation I would
like to perform.
I belive I have to add the data before plotting, but it would be very
convenient the other way.

Thanks,

Dirk

 
 
 

adding data

Post by Hans-Bernhard Broeke » Fri, 25 Jul 2003 01:31:14



> Hi all,
> is there a possibility to add ( or perform another operation) in gnuplot
> directly with data from different data files ?

No, you'll at least have to join the files outside gnuplot before you can
do that.  E.g. if you're on a platform that supports piping:

        plot '< paste test1.dat test2.dat' using 1:($2+$4)

Generally speaking, heavy-duty data manipulation is not gnuplot's
domain.  There are better tools for that, beginning with good old AWK.

--

Even if all the snow were burnt, ashes would remain.

 
 
 

adding data

Post by Dirk Geye » Fri, 25 Jul 2003 01:44:22




>>Hi all,

>>is there a possibility to add ( or perform another operation) in gnuplot
>>directly with data from different data files ?

> No, you'll at least have to join the files outside gnuplot before you can
> do that.  E.g. if you're on a platform that supports piping:

>    plot '< paste test1.dat test2.dat' using 1:($2+$4)

> Generally speaking, heavy-duty data manipulation is not gnuplot's
> domain.  There are better tools for that, beginning with good old AWK.

Thanks a lot. As far as I know Windows is limited with piping.

Dirk

 
 
 

1. Adding in arbitrary rib data

        Is there a RiAddThis( adds everything in here ) type function that will just
take a string and spit that out into the rib stream as is.  I've been using
the pipe rioption to open the rib with a file handle and have been writing to
the rib like that, but - of course - when the rib is output as a binary rib
file or gzipped it doesn't act in very healthy ways.  

        Cheers, C.

--
Colin Doncaster
Weta Digital Ltd.

"Against cruelty to hedgehogs!"

2. I NEED Your LINKS (PROFESSIONALS ONLY)

3. Adding Streets to DEM Data?

4. WGT NEWS

5. Adding colour to scanned line drawings for CMYK printing Adding colour to scanned line drawings for CMYK printing Adding colour to scanned line drawings for CMYK printing

6. Using Press Ready PDFs

7. Accessing raw MRI data for data visualization

8. is Messiah gone then?

9. data format of MRI brain data.

10. Workshop on Data Mining and Data Visualization announcement

11. Data Visualization, Data Fusion prototyping tools

12. Data Acquisition Interface for Raw Data to 24bit Color in 3D

13. Data structures for fast viewing of volume data