(* 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\"
<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. *)
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";
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))