File: transparent.dem

package info (click to toggle)
gnuplot5 5.0.0~rc%2Bdfsg2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,548 kB
  • ctags: 8,104
  • sloc: ansic: 77,108; cpp: 6,848; makefile: 1,932; sh: 1,343; lisp: 657; perl: 302; awk: 235; pascal: 194; tcl: 88; python: 46
file content (55 lines) | stat: -rw-r--r-- 1,330 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# Example of transparent fill areas
# Ethan A Merritt - Aug 2006
# NB:
#    Not all terminal types support transparency
#    Assumes UTF-8 support for plot titles
#
save_encoding = GPVAL_ENCODING
set encoding utf8
set style fill solid 1.0 noborder
set style function filledcurves y1=0
set clip two

Gauss(x,mu,sigma) = 1./(sigma*sqrt(2*pi)) * exp( -(x-mu)**2 / (2*sigma**2) )
d1(x) = Gauss(x, 0.5, 0.5)
d2(x) = Gauss(x,  2.,  1.)
d3(x) = Gauss(x, -1.,  2.)

set xrange [-5:5]
set yrange [0:1]

unset colorbox

set key title "Gaussian Distribution"
set key top left Left reverse samplen 1

#set obj 1 rect from graph 0,0 to graph 1,1
#set obj 1 rect back fs solid 0.25 fc lt 4

set title "Solid filled curves"
plot d1(x) fs solid 1.0 lc rgb "forest-green" title "μ =  0.5 σ = 0.5", \
     d2(x) lc rgb "gold" title "μ =  2.0 σ = 1.0", \
     d3(x) lc rgb "dark-violet" title "μ = -1.0 σ = 2.0"

pause -1 "Hit return to continue"

set style fill transparent solid 0.5 noborder
set title "Transparent filled curves"
replot

pause -1 "Hit return to continue"

set style fill pattern 4 bo
set title "Pattern-filled curves"
replot

pause -1 "Hit return to continue"

set style fill transparent pattern 4 bo
set title "Transparent pattern-filled curves"
replot

pause -1 "Hit return to continue"
set encoding save_encoding
reset