File: lambert.dem

package info (click to toggle)
gnuplot 6.0.3%2Bdfsg1-1~exp2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 14,960 kB
  • sloc: ansic: 95,874; cpp: 7,199; makefile: 2,470; javascript: 2,339; sh: 1,531; lisp: 664; perl: 304; pascal: 191; tcl: 88; python: 46
file content (80 lines) | stat: -rw-r--r-- 1,924 bytes parent folder | download | duplicates (3)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#
#
#
# Check support for LambertW
if (!strstrt(GPVAL_COMPILE_OPTIONS, "+COMPLEX_FUNC")) {
    print "This copy of gnuplot does not support complex LambertW"
    exit  # return to caller
}
#
# Complex Lambert W function
#
I = {0,1}
e = exp(1.0)

set title "real-valued range of Lambert W function for branches k=0 k=-1"

set xrange [-1:3]
set yrange [-4:2]
set samples 1000
set xzeroaxis
set yzeroaxis
set xtics 0, 0.5
set xtics add ("-1/e" -exp(-1))
set arrow 1 from -1/e, graph 0 to -1/e, LambertW(-exp(-1),0) nohead lt 0

plot sample [x = -1./e : 4.] LambertW(x, 0) lw 2, [x = -1./e : 0] LambertW(x,-1) lw 2

pause -1 "Hit return to continue"

set border -1 front lt black linewidth 1.000 dashtype solid
unset key
unset arrow 1
set xtics 0.5
unset colorbox
set view 42, 23, 0.928406, 1.65
set isosamples 30, 30
set style func lines
set contour base
set cntrparam levels 11
set cntrparam levels incremental -1,0.2
set cntrparam firstlinetype 101
set for [l=2:7] linetype l+99 lc l lw 2
set xyplane at -2
set title  offset character 15
set xrange [ -2.000 : 1.000 ]
set yrange [ -1.000 : 1.000 ]
set zrange [ -2.000 : 1.800 ]

set title "real( LambertW( x + iy, 0 ) )" 
splot real(LambertW( x + I*y, 0 )) lc "plum"

pause -1 "Hit return to continue"

set title "imag( LambertW( x + iy, 0 ) )" 
set key 
splot imag(LambertW( x + I*y, 0 )) lc "cyan" title ""

pause -1 "Hit return to continue"

reset
set view 75, 281, 1.11607, 1.33952
set isosamples 30, 30
set style data lines
set xyplane at 0
set title  font ",15"
set xrange [ -10.00 : 10.00 ]
set yrange [ -8.00 : 12.00 ]
set zrange [ 0.00 : * ] noextend
set ytics offset 0,-1 scale 3.0
set xtics offset 0,-0.5
set pm3d depthorder 
set pm3d border lt black linewidth 0.25
unset colorbox

set title "LambertW( x+{/:Italic i}y, k )"
 
splot for [k=0:4] abs(LambertW(x+y*{0,1}, k)) with pm3d lc k title sprintf("  k = %d",k) at end

pause -1 "Hit return to continue"
reset