1#
2# Example of transparent fill areas
3# Ethan A Merritt - Aug 2006
4# NB:
5#    Not all terminal types support transparency
6#    Assumes UTF-8 support for plot titles
7#
8save_encoding = GPVAL_ENCODING
9set encoding utf8
10set style fill solid 1.0 noborder
11set style function filledcurves y1=0
12
13Gauss(x,mu,sigma) = 1./(sigma*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sigma**2) )
14d1(x) = Gauss(x, 0.5, 0.5)
15d2(x) = Gauss(x,  2.,  1.)
16d3(x) = Gauss(x, -1.,  2.)
17
18set xrange [-5:5]
19set yrange [0:1]
20
21unset colorbox
22
23set key title "Gaussian Distribution"
24set key top left Left reverse samplen 1
25
26#set obj 1 rect from graph 0,0 to graph 1,1
27#set obj 1 rect back fs solid 0.25 fc lt 4
28
29set title "Solid filled curves"
30plot d1(x) fs solid 1.0 lc rgb "forest-green" title "μ =  0.5 σ = 0.5", \
31     d2(x) lc rgb "gold" title "μ =  2.0 σ = 1.0", \
32     d3(x) lc rgb "dark-violet" title "μ = -1.0 σ = 2.0"
33
34pause -1 "Hit return to continue"
35
36set style fill transparent solid 0.5 noborder
37set title "Transparent filled curves"
38replot
39
40pause -1 "Hit return to continue"
41
42set style fill pattern 4 bo
43set title "Pattern-filled curves"
44replot
45
46pause -1 "Hit return to continue"
47
48set style fill transparent pattern 4 bo
49set title "Transparent pattern-filled curves"
50replot
51
52pause -1 "Hit return to continue"
53set encoding save_encoding
54reset
55