# Example 5
# A gallery of trigonometric functions demonstrating
# the use of linked axes.

reset
set term landscape eps
set output 'examples/eps/example5.eps'
set multiplot

set xlabel '$x$'
set ylabel '$y$'
set xrange [-10.9:10.9]

width  = 8
height = 5.75

# Plot 0 (bottom left)
set key bottom right
set origin 0*width, 0*height
plot sin(x) with colour 3

# Plot 1 (bottom right)
set key top right
set origin 1*width, 0*height
set ylabel 'linkaxis 0'
plot cos(x)-1 with colour 6

# Plot 2 (top left)
set key top right
set origin 0*width, 1*height
set xlabel 'linkaxis 0'
set ylabel '$y$'
plot cos(x) with colour 7

# Plot 3 (top right)
set key bottom right
set origin 1*width, 1*height
set xlabel 'linkaxis 1'
set ylabel 'linkaxis 2'
plot sin(x)**2 + 1 with colour 8

# Produce a gif copy
set term gif
set output 'examples/eps/example5.gif'
refresh
