Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
(* $Id: plot.mli,v 1.2 2016/01/28 13:51:28 garrigue Exp $ *)
(* Plot: a library to plot graphs of functions easily *)
(* Adjust coordinates in the window so that it contains all points in
the list. Can also be used as: adjust_size [minx, miny; maxx, maxy].
After adjusting, opens a window and draw axis. *)
val adjust_size : (float * float) list -> unit
(* Create the graph of a function between minx and maxx.
Passing this graph to adjust_size will ajust the window to display it. *)
val create_curve : (float -> float) -> (float * float) list
(* Draw the graph as a curve *)
val draw_curve : (float * float) list -> unit
(* The raw canvas (for debugging) *)
val canvas : Widget.canvas Widget.widget
(* The Tk main loop (to resize the window, etc...); stop with Ctrl-C *)
val loop : unit -> unit
(* A standard use of these functions is:
#directory "+labltk";;
#load "labltk.cma";;
#load "plot.cmo";;
open Plot ;;
adjust_size [-5., 0.; 5., 0.] ;;
let curve = create_curve (fun x -> (sin x) ** 2. -. 0.5) ;;
adjust_size curve ;;
draw_curve curve ;;
*)