[gmx-users] Plot data

Anton Feenstra feenstra at chem.vu.nl
Wed May 1 11:24:56 CEST 2002


Anton Feenstra wrote:
> 
> Nguyen Hoang Phuong wrote:
> >
> > Dear David,
> >
> > I would like to display the first point (say x1,y1) and then wait about 1s
> > to display the next one (x2,y2) and so on. Is there any way to do that?
> 
> I read in the xmgrace manual that it can read (live) data from a pipe
> and display it on the go. That would mean that a small script which
> outputs your file line-by-line with a one second interval would do the
> trick. If your file is named 'diff.xvg', this might work:
> # awk '{print; system("sleep 1");}' diff.xvg | xmgrace -pipe
> but it might require an additional flag set to xmgrace...

The real world (as always) is slightly more complicated.
The following example works, guaranteed (at least for me it does):
[beware that it is one single commandline]

# awk '/^[^#@]/ {printf "g0.s0 point %g, %g\nautoscale\nredraw\n", $1, $2; system("sleep 1")}' diff.xvg | xmgrace -dpipe -

-- 
Groetjes,

Anton
 ________ ___________________________________________________________
|        | Anton Feenstra                                            |
| .      | Dept. of Pharmacochemistry - Free University Amsterdam    |
| |----  | De Boelelaan 1083 - 1081 HV Amsterdam - The Netherlands   |
| |----  | Tel: +31 20 44 47608 - Fax: +31 20 44 47610               |
| ' __   | Feenstra at chem.vu.nl - http://www.chem.vu.nl/afdelingen/FAR|
|  /  \  |-----------------------------------------------------------|
| (    ) | Dept. of Biophysical Chemistry - University of Groningen  |
|  \__/  | Nijenborgh 4 - 9747 AG Groningen - The Netherlands        |
|   __   | Tel +31 50 363 4327 - Fax +31 50 363 4800                 |
|  /  \  | K.A.Feenstra at chem.rug.nl - http://md.chem.rug.nl/~anton   |
| (    ) |-----------------------------------------------------------|
|  \__/  | "I Calculate My Birthright" (P.J. Harvey)                 |
|________|___________________________________________________________|



More information about the gromacs.org_gmx-users mailing list