Ian Jauslin
summaryrefslogtreecommitdiff
blob: 3d8d2475b49d4735913f18791d7cbb9f5ddeaaf0 (plain)
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
#!/usr/bin/env gnuplot

# output file
outfile="flow_plot.tex"
set output outfile

# tics
set x2tics ("$\\log_2\\epsilon$" 5, "$3\\log_2\\epsilon$" 15) nomirror out
set ytics ("$1$" 1, "$\\epsilon$" 2**(-5), "$2\\epsilon|\\log_2\\epsilon|$" 2**(-5)*(15-5+1)) nomirror out
unset xtics

set xrange [0:20]
set yrange [-0.5:1]

# remove key
unset key

# titles
set x2label "$h$" offset 18,-3
set ylabel norotate "$|V_h|$" offset 10.5,-9

# set terminal (add color definitions for title)
set term lua tikz size 8.33,5.833 standalone font "\\footnotesize"

# 3=1+2 draw bottom and left sides of the box
set border 6

# set linestyles
set style line 2 linetype rgbcolor "#DC143C" linewidth 2
set style line 3 linetype rgbcolor "#32CD32" linewidth 2

# extra text
set label "irrelevant" at 2.5,-0.1 center textcolor "#32CD32"
set label "$\\sim 2^{h}$" at 2.5,-0.25 center textcolor "#32CD32"
set label "marginal" at 10,-0.1 center textcolor "#DC143C"
set label "$\\sim\\epsilon|h-\\log_2\\epsilon|$" at 10,-0.25 center textcolor "#DC143C"
set label "irrelevant" at 17.5,-0.1 center textcolor "#32CD32"
set label "$\\sim\\epsilon|2\\log_2\\epsilon|2^{h-3\\log_2\\epsilon}$" at 15,-0.25 left textcolor "#32CD32"

set samples 97

set arrow from 0,1 to 20,1
set arrow from 0,1 to 0,-0.5

set arrow from 5,1 to 5,-0.5 nohead dashtype 2
set arrow from 15,1 to 15,-0.5 nohead dashtype 2

# plots
plot \
 ((x<=5) ? 2**(-x) : 1/0) linestyle 3,\
 ((x>=5 && x<=15) ? 2**(-5)*(x-5+1) : 1/0) linestyle 2,\
 ((x>=15) ? 2**(-5)*(15-5+1)*2**(-(x-15)) : 1/0) linestyle 3