Overview
Comment:Gnu plot conversion now done externally in dat2gdat
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: cf192ce496fb9a6d4c1026033700f7437f5a264465ec8702c78742e56a54c0ec
User & Date: gawthrop@users.sourceforge.net on 1996-08-14 09:21:17
Other Links: branch diff | manifest | tags
Context
1996-08-14
19:20:41
Fixed output naming bug. check-in: 2a444bb6bd user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:21:17
Gnu plot conversion now done externally in dat2gdat check-in: cf192ce496 user: gawthrop@users.sourceforge.net tags: origin/master, trunk
09:16:08
Step response now goes through m, dat and gdat conversions check-in: 6169ce90bb user: gawthrop@users.sourceforge.net tags: origin/master, trunk
Changes

Modified mttroot/mtt/bin/trans/gdat2ps from [b35e469141] to [03a3d7e493].

1
2
3
4
5
6
7

8
9

10
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
57

58

59
60
61
1
2
3
4
5
6

7
8

9
10
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






-
+

-
+








+
+
+










-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-





+
-
+



#! /bin/sh

     ###################################### 
     ##### Model Transformation Tools #####
     ######################################

# Bourne shell script: dat2ps
# Bourne shell script: gdat2ps

# Converts a data file to a ps file
# Converts a data file in gplot format to a ps file

# Copyright (c) P.J.Gawthrop, 1996.

###############################################################
## Version control history
###############################################################
## $Id$
## $Log$
## Revision 1.3  1996/08/10 14:12:48  peter
## Revised to new dat format: [x y x y x y] in place of [x y y y].
##
## Revision 1.2  1996/08/10 12:54:56  peter
## Reorganised data file for gnuplot input.
##
## 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++;
  for (col = 1; col <= NF/2; col++) {
    xcol = 2*col-1;
    ycol = 2*col;
    x[row,col] = $xcol
    y[row,col] = $ycol
  }
}
END {
  cols = col-1;
  rows = row;
  for (col = 1; col <= cols; col++) {
    for (row = 1; row <= rows; row++) {
      print x[row,col], y[row,col]
    };
  if (col<cols) {
    printf("\n")
  }
  }
}' $1.dat > $1.gdat

gnuplot << EOF
  set terminal postscript
  set output '$1.ps'
  set grid
  # set size 0.2,0.2
  set title "$1.dat. Generated by MTT on $(date)"
  set title "$1. Generated by MTT on $(date)"
  plot '$1.gdat' with lines
  exit
EOF


MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]