Search code examples
plotxmgrace

xmgrace pipe nxy together


Can the -nxy option be used together with the -pipe option?

For example, suppose "somecommand" produces an output with 5 columns (x y1 y2 y3 y4). I could plot the y's as a function of x using

somecommand > tmp.dat
xmgrace -nxy tmp.dat

Can I bypass the creation of the file tmp.dat using the -pipe option and still plot the 4 different y's together?

somecommand | xmgrace -pipe 

would plot the y1 vs x. I would like to have all the y's vs x.


Solution

  • Yes, just pass - to -nxy to tell xmgrace to use stdin as the data source:

    somecommand | xmgrace -pipe -nxy -