1#
2# Exercise use of macro substitution
3#
4set macros
5
6title = "Test of command line macro substitution"
7style1 = "points"
8style2 = "lines lw 2"
9plot1 = "'1.dat' using 1:2 with @style1"
10plot2 = "'1.dat' using 1:($2+1) with @style2"
11plot3 = '@plot2'
12plot4 = '@plot3'
13plot5 = '@plot4'
14plot6 = '@plot5'
15#
16set title title
17plot @plot1 title 'plot1', \
18     @plot2 title 'plot2'
19show var
20#
21pause -1 "<cr> to test limit on recursion depth"
22#
23print "testing depth 3"
24plot @plot1 title 'plot1', @plot3 lt 3 title 'Recursion depth 3'
25pause 1
26print "testing depth 4"
27plot @plot1 title 'plot1', @plot4 lt 4 title 'Recursion depth 4'
28pause 1
29print "testing depth 5"
30plot @plot1 title 'plot1', @plot5 lt 5 title 'Recursion depth 5'
31pause 1
32#
33pause -1
34
35