From: Johannes Middeke <j-middeke@t-online.de>
Date: Thu, 5 May 2016 02:33:30 +0000 (-0400)
Subject: Fixed the labels on the graphs.
X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=cf38b894a15187232f22430a0e649f10229c326c;p=jmiddeke%2FLU.git

Fixed the labels on the graphs.
---

diff --git a/commonSVG.ml b/commonSVG.ml
index 2e79d15..0100596 100644
--- a/commonSVG.ml
+++ b/commonSVG.ml
@@ -86,7 +86,8 @@ let defs total_colour prediction_colour =  Printf.printf "<defs>
     
 (* Prints the axes of the coordinate system. *)
 
-let axes () = Printf.printf "<path d=\"M25,25 L25,425 L425,425\"
+let axes x_label y_label =
+  Printf.printf "<path d=\"M25,25 L25,425 L425,425\"
         stroke=\"#000\"
         stroke-width=\"2\"
         fill=\"none\"
@@ -97,12 +98,12 @@ let axes () = Printf.printf "<path d=\"M25,25 L25,425 L425,425\"
   <text x=\"435\" y=\"430\"
         style=\"font-size:14px;font-style:italic;\"
         text-anchor=\"start\">
-    n
+    %s
   </text>
   <text x=\"35\" y=\"25\" style=\"font-size:14px\"
         text-anchor=\"start\">
-    factor degrees
-  </text>"
+    %s
+  </text>" x_label y_label
 
 (* Prints the tikz for the axes of the coordinate system. *)
 
diff --git a/makeHTML.ml b/makeHTML.ml
index eded866..affb963 100644
--- a/makeHTML.ml
+++ b/makeHTML.ml
@@ -28,9 +28,8 @@ let main total predict =
   let coords = map_coords ~width:60. ~height:60. in
   head "Common Factor Count" "Common Factor Count over GF(2)[<i>x</i>]";
   defs total predict;
-  axes ();
+  axes "<tspan font-style=\"italic\">n</tspan>" "# factors";
   ticks coords ~x:50 ~step_x:5 ~y:50 ~step_y:5 ();
-  axes ();
   mean
     |> List.map (fun (n,(_,t)) -> (float n, t))
     |> graph coords total "total";
diff --git a/makeHTMLdegrees.ml b/makeHTMLdegrees.ml
index a480e56..b84830e 100644
--- a/makeHTMLdegrees.ml
+++ b/makeHTMLdegrees.ml
@@ -27,7 +27,7 @@ let main samples total predict =
   let coords = map_coords ~width:90. ~height:120. in
   head "Common Factor Degrees" "Common Factor Degrees over GF(2)[<i>x</i>]";
   defs total predict;
-  axes ();
+  axes "<tspan font-style=\"italic\">n</tspan>" "factor degrees";
   ticks coords ~x:80 ~step_x:5 ~y:110 ~step_y:10 ();
   mean
   |> List.map (fun (n,(_,t)) -> (float n, t))