Overview
| Comment: | Reorganised data file for gnuplot input. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | origin/master | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
918f93dd9baa3e5ab170a914a56f0c65 |
| User & Date: | gawthrop@users.sourceforge.net on 1996-08-10 12:54:56.000 |
| Other Links: | branch diff | manifest | tags |
Context
|
1996-08-10
| ||
| 14:12:48 | Revised to new dat format: [x y x y x y] in place of [x y y y]. check-in: 24e133d5ee user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 12:54:56 | Reorganised data file for gnuplot input. check-in: 918f93dd9b user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
| 11:49:39 | Fixed multi-input/output problem check-in: b3b042b665 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/gdat2ps
from [1bdf63f817]
to [79cf506d73].
| ︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Copyright (c) P.J.Gawthrop, 1996. ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ############################################################### echo Creating $1.ps gnuplot << EOF set terminal postscript set output '$1.ps' set grid set title "$1.dat. Generated by MTT on $(date)" | > > > > > > > > > > > > > > > > > > > > > > > > > > > | | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# Copyright (c) P.J.Gawthrop, 1996.
###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.1 1996/08/10 09:52:39 peter
## Initial revision
##
###############################################################
echo Creating $1.ps
# Convert multi-columns into gnuplot format -
# ie stack two columns vertically separated by blank lines
awk '
BEGIN{row=0; col=0}
{
row++;
x[row] = $1;
for (col = 2; col <= NF; col++) {
y[row,col] = $col
}
}
END {
cols = col-1;
rows = row;
for (col = 2; col <= cols; col++) {
for (row = 1; row <= rows; row++) {
print x[row], y[row,col]
};
if (col<cols) {
printf("\n")
}
}
}' $1.dat > $1.gdat
gnuplot << EOF
set terminal postscript
set output '$1.ps'
set grid
set title "$1.dat. Generated by MTT on $(date)"
plot '$1.gdat' with lines
exit
EOF
|