handouts/graphs.tex
changeset 990 ef63ae3586b8
parent 497 c498cb53a9a8
--- a/handouts/graphs.tex	Fri Sep 19 18:41:04 2025 +0100
+++ b/handouts/graphs.tex	Fri Sep 26 19:09:50 2025 +0100
@@ -1,13 +1,69 @@
 \documentclass{article}
-\usepackage{../style}
-\usepackage{../langs}
-\usepackage{../graphics}
-\usepackage{../data}
+\usepackage{tikz}
+\usepackage{pgf}
+\usepackage{pgfplots}
+
+\pgfplotsset{compat=1.15}
+
+
+%% DATA for the graphs: first x coordinate, second y coordinate
+\begin{filecontents}{re-python2.data}
+1 0.033
+5 0.036
+10 0.034
+15 0.036
+18 0.059
+19 0.084
+20 0.141
+21 0.248
+22 0.485
+23 0.878
+24 1.71
+25 3.40
+26 7.08
+27 14.12
+28 26.69
+\end{filecontents}
+
+\begin{filecontents}{re-java.data}
+5  0.00298
+10  0.00418
+15  0.00996
+16  0.01710
+17  0.03492
+18  0.03303
+19  0.05084
+20  0.10177
+21  0.19960
+22  0.41159
+23  0.82234
+24  1.70251
+25  3.36112
+26  6.63998
+27  13.35120
+28  29.81185
+\end{filecontents}
+
+\begin{filecontents}{re3a.data}
+1 0.00003
+500001 0.22527
+1000001 0.62752
+1500001 0.88485
+2000001 1.39815
+2500001 1.68619
+3000001 1.94957
+3500001 2.15878
+4000001 2.59918
+4500001 5.90679
+5000001 13.11295
+5500001 19.15376
+6000001 40.16373
+\end{filecontents}
+
 
 
 \begin{document}
 
-
 \section*{Benchmarks for $(a^*)^* b$ and $a^{?\{n\}} a^{\{n\}}$}
 
 \mbox{}\bigskip
@@ -42,19 +98,16 @@
   \begin{axis}[
     xlabel={$n$},
     x label style={at={(1.1,0.0)}},
-    %%xtick={0,1000000,...,5000000}, 
     ylabel={time in secs},
     enlargelimits=false,
     ymax=35,
     ytick={0,5,...,30},
     axis lines=left,
-    %scaled ticks=false,
     width=6.5cm,
     height=5cm,
     legend entries={Derivative matcher},  
     legend pos=north east,
     legend cell align=left]
-%\addplot[green,mark=square*,mark options={fill=white}] table {re2a.data};    
 \addplot[black,mark=square*,mark options={fill=white}] table {re3a.data};
 \end{axis}
 \end{tikzpicture}
@@ -103,7 +156,6 @@
     legend entries={Derivative matcher},  
     legend pos=north east,
     legend cell align=left]
-%\addplot[green,mark=square*,mark options={fill=white}] table {re2.data};
 \addplot[black,mark=square*,mark options={fill=white}] table {re3.data};
 \end{axis}
 \end{tikzpicture}
@@ -111,13 +163,6 @@
 \end{center}
 
 
-\subsubsection*{Sources}
-
-
-\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.java}\medskip
-
-\noindent
-\url{http://talisker.inf.kcl.ac.uk/cgi-bin/repos.cgi/afl-material/raw-file/tip/progs/catastrophic.py}
 
 \end{document}