2 # Demonstrate use of 'set {btlr}margin at screen <value>'
3 # to pin plot borders to a specific place on the canvas.
4 # This allows positioning multiple plots on the page so that their
5 # corners line up perfectly.
7 # Aug 2006 - Ethan A Merritt
10 set multiplot title "Demo of placing multiple plots (2D and 3D)\nwith explicit alignment of plot borders"
15 set lmargin at screen 0.20
16 set rmargin at screen 0.85
17 set bmargin at screen 0.25
18 set tmargin at screen 0.90
21 set palette rgbformulae 7, 5, 15
26 set xrange [ -15.00 : 15.00 ]
27 set yrange [ -15.00 : 15.00 ]
28 set zrange [ -0.250 : 1.000 ]
35 splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2)
41 # second plot (tall and narrow; at left of main plot)
43 set lmargin at screen 0.10
44 set rmargin at screen 0.20
52 f(h) = sin(sqrt(h**2))/sqrt(h**2)
54 set urange [ -15.00 : 15.00 ]
55 set vrange [ -15.00 : 15.00 ]
59 splot f(u), u, 0 with lines lc rgb "green"
64 # third plot (short and wide; at bottom of main plot)
66 set lmargin at screen 0.20
67 set rmargin at screen 0.85
68 set bmargin at screen 0.10
69 set tmargin at screen 0.25
71 set xrange [ -15.00 : 15.00 ]
77 plot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2)
81 pause -1 "Hit return to continue"