1. This is dataplot macro    upperleft.dp
2. Write 1, 2, 3, 4, or 5 short text strings in upper left corner of plot page
3. Date: February 2, 2009 ==> June 23, 2011
4. Input: stcorn1 = first  string to be printed out
5.        stcorn2 = second string to be printed out     (optional)
6.        stcorn3 = third  string to be printed out     (optional)
7.        stcorn4 = fourth string to be printed out     (optional)
8.        stcorn5 = fifth  string to be printed out     (optional)
9.
10.        cornh   = height of character                 (parameter) (default = 4)
11.        cornw   = width  of character                 (parameter) (default = 2)
12.        cornxp  = center horizontal point of the text (parameter) (default = 2)
13.        cornyp  = bottom vertical   point of the text (parameter) (default = 100-cornh+2)
14.
15.        corncol = text color                           (string)    (default = blue)
16.        corncol1 = text color for line 1               (string)    (default = blue)
17.        corncol2 = text color for line 2               (string)    (default = blue)
18.        corncol3 = text color for line 3               (string)    (default = blue)
19.        corncol4 = text color for line 4               (string)    (default = blue)
20.        corncol5 = text color for line 5               (string)    (default = blue)
21.
22. Macros needed: 0
23.
24. Example of calling routine: fenimore42.dp
25.       let string stcorn1 = Ylim = ^case
26.       let string stcorn2 = Src = ^jsource
27.       if case = 1; . let string corncol = blue; . end if
28.       if case = 2; . let string corncol = red; . end if
29.       if case = 3; . let string corncol = cyan; . end if
30.       if case = 4; . let string corncol = ^darkgree; . end if
31.       let cornyp = 97
32.       let cornxp = 6.5
33.       call upperleft.dp
34.       call annotate.dp
35.
36. -----start point-----
37.
38. print "at beginning of macro     upperleft.dp"
39. pause
40.
41just center
42.
43. -----Step 1: Check input arguments for existence errors:"
44.
45. if stcorn not exist
46.    if stcorn1 not exist
47.       print " "
48.       print "===================================="
49.       print "Input Error in macro   upperleft.dp:"
50.       print "   Neither stcorn nor stcorn1 exists"
51.       print "   In pause mode . . ."
52.       print "===================================="
53.       pause
54.    end if
55. end if
56.
57. -----Step 2: Define character height and width-----
58.
59. let cornhz = 6     commented out 11/15/17
60. let cornwz = 3     commented out 11/15/17
61let cornhz = 4
62let cornwz = 2
63if cornh exists; let cornhz = cornh; end if
64if cornw exists; let cornwz = cornw; end if
65.
66. hw cornhz cornwz;. bug--not working 2/27/14
67height cornhz
68width cornwz
69.
70. print cornh cornw cornhz cornwz
71. pause
72.
73. -----Step 3: Define character color-----
74.
75let string corncolz = blue
76if corncol exists; let string corncolz = ^corncol; end if
77color ^corncolz
78.
79. -----Step 4: Define string positions-----
80.
81if stcorn exists
82   . let cornxpz = 5
83   let cornxpz = 2
84   . let cornypz = 100 - cornhz
85   let cornypz = 100 - cornhz + 2
86   if cornxp exists; let cornxpz = cornxp; end if
87   if cornyp exists; let cornypz = cornyp; end if
88   move cornxpz cornypz; text ^stcorn
89. print "cornxpz = ^cornxpz     cornypz = ^cornypz     stcorn = ^stcorn"
90. pause
91end if
92.
93. -----Step 11: If existent, then write out line 1-----
94.
95. print "---In upperleft.dp, at beginning of step 11---"
96. pause
97.
98. if pagecsw1 exists
99.    if pagecsw1 = 1
100.       let pagecop1 = pagecoun + 1
101.       let string stcorn1 = ^pagecop1
102.    end if
103. end if
104.
105. print "stcorn1 = ^stcorn1"
106. pause
107if stcorn1 exists
108   let cornxpz = 5
109   if cornxp exists; let cornxpz = cornxp; end if
110   let cornypz = 100 - cornhz
111. print cornypz cornhz
112. pause
113   if cornxp exists; let cornxpz = cornxp; end if
114   if cornyp exists; let cornypz = cornyp; end if
115   if corncol exists; color ^corncol; end if
116   if corncol1 exists; color ^corncol1; end if
117   move cornxpz cornypz; text ^stcorn1
118. print "cornxpz = ^cornxpz     cornypz = ^cornypz     stcorn1 = ^stcorn1"
119. pause
120end if
121.
122. -----Step 12: If existent, then write out line 2-----
123.
124. print "---In upperleft.dp, at beginning of step 12---"
125. pause
126.
127. if pagecsw2 exists
128.    if pagecsw2 = 1
129.       let pagecop1 = pagecoun + 1
130.       let string stcorn2 = ^pagecop1
131.    end if
132. end if
133.
134if stcorn2 exists
135   let cornypz = cornypz - cornhz
136   if corncol exists; color ^corncol; end if
137   if corncol2 exists; color ^corncol2; end if
138   move cornxpz cornypz; text ^stcorn2
139end if
140.
141. -----Step 13: If existent, then write out line 3-----
142.
143. print "---In upperleft.dp, at beginning of step 13---"
144. pause
145.
146. if pagecsw3 exists
147.    if pagecsw3 = 1
148.       let pagecop3 = pagecoun + 1
149.       let string stcorn1 = ^pagecop1
150.    end if
151. end if
152.
153if stcorn3 exists
154   let cornypz = cornypz - cornhz
155   . color navy
156   if corncol exists; color ^corncol; end if
157   if corncol3 exists; color ^corncol3; end if
158   move cornxpz cornypz; text ^stcorn3
159end if
160.
161. -----Step 14: If existent, then write out line 4-----
162.
163. if pagecsw4 exists
164.    if pagecsw4 = 1
165.       let pagecop1 = pagecoun + 1
166.       let string stcorn4 = ^pagecop1
167.    end if
168. end if
169.
170if stcorn4 exists
171   let cornypz = cornypz - cornhz
172   . color navy
173   if corncol exists; color ^corncol; end if
174   if corncol4 exists; color ^corncol4; end if
175   move cornxpz cornypz; text ^stcorn4
176end if
177.
178. -----Step 15: If existent, then write out line 5-----
179.
180. if pagecsw5 exists
181.    if pagecsw5 = 1
182.       let pagecop5 = pagecoun + 1
183.       let string stcorn1 = ^pagecop1
184.    end if
185. end if
186.
187if stcorn5 exists
188   let cornypz = cornypz - cornhz
189   . color navy
190   if corncol exists; color ^corncol; end if
191   if corncol5 exists; color ^corncol5; end if
192   move cornxpz cornypz; text ^stcorn5
193end if
194.
195. -----Step 16: If existent, then write out line 6-----
196.
197. if pagecsw6 exists
198.    if pagecsw6 = 1
199.       let pagecop6 = pagecoun + 1
200.       let string stcorn1 = ^pagecop1
201.    end if
202. end if
203.
204if stcorn6 exists
205   let cornypz = cornypz - cornhz
206   . color navy
207   if corncol exists; color ^corncol; end if
208   if corncol6 exists; color ^corncol6; end if
209   move cornxpz cornypz; text ^stcorn6
210end if
211.
212. -----Step 17: If existent, then write out line 7-----
213.
214if stcorn7 exists
215   let cornypz = cornypz - cornhz
216   . color navy
217   if corncol exists; color ^corncol; end if
218   if corncol7 exists; color ^corncol7; end if
219   move cornxpz cornypz; text ^stcorn7
220end if
221.
222. -----Step 18: If existent, then write out line 8-----
223.
224if stcorn8 exists
225   let cornypz = cornypz - cornhz
226   . color navy
227   if corncol exists; color ^corncol; end if
228   if corncol8 exists; color ^corncol8; end if
229   move cornxpz cornypz; text ^stcorn8
230end if
231.
232. -----Step 19: If existent, then write out line 9-----
233.
234if stcorn9 exists
235   let cornypz = cornypz - cornhz
236   . color navy
237   if corncol exists; color ^corncol; end if
238   if corncol9 exists; color ^corncol9; end if
239   move cornxpz cornypz; text ^stcorn9
240end if
241.
242. -----Step 99: Finish up-----
243.
244. box color ^corncol
245. box 0.5 96.25 18 99.75
246.
247color blue
248hw 2 1
249just left
250.
251height 2
252width 1
253