functor (D : DATA->
  sig
    type device =
      Gnuplot_common_.device =
        X
      | Wxt
      | PS of string
      | EPS of string
      | EPSLaTeX of string
      | FIG of string
      | PNG of string
      | MP of string
      | MF of string
      | SVG of string
    type color = int
    type handle = Gnuplot_common_.handle
    type style =
      Gnuplot_common_.style =
        Lines
      | Linespoints
      | Points
      | Dots
      | Impulses
    val device_of_filename : string -> device
    val init :
      ?offline:string ->
      ?max_inline:int ->
      ?persist:bool ->
      ?color:bool ->
      ?nxsub:int ->
      ?nysub:int ->
      ?xsize:float -> ?ysize:float -> ?aspect:float -> device -> handle
    val close : handle -> unit
    val adv : ?sub:int -> handle -> unit
    val clear : handle -> unit
    val pen : handle -> int -> unit
    val color : handle -> color -> unit
    val pen_width : handle -> float -> unit
    val point : handle -> int -> unit
    val point_width : handle -> float -> unit
    val font : handle -> string -> unit
    val font_size : handle -> int -> unit
    val title : handle -> string -> unit
    val xlabel : handle -> string -> unit
    val ylabel : handle -> string -> unit
    type coord = Graph | Viewport | Subpage | World
    val text :
      handle ->
      ?tag:int ->
      ?frame:float ->
      ?rotate:float -> ?coord:coord -> float -> float -> string -> unit
    val show : ?immediately:bool -> ?tag:int -> handle -> unit
    val hide : ?immediately:bool -> ?tag:int -> handle -> unit
    val auto : tag:int -> handle -> unit
    val free : tag:int -> handle -> unit
    val win : handle -> float -> float -> float -> float -> unit
    type axis_opt
    type border_loc = int list
    val axis : ?which:border_loc -> unit -> axis_opt
    val border : ?which:border_loc -> unit -> axis_opt
    val tics :
      ?which:border_loc ->
      ?outward:bool ->
      ?grid:bool ->
      ?minor:int ->
      ?minor_grid:bool -> ?log:bool -> ?step:float -> unit -> axis_opt
    val labels :
      ?which:border_loc -> ?prec:int -> ?rotate:bool -> unit -> axis_opt
    val box : ?x:axis_opt list -> ?y:axis_opt list -> handle -> unit
    val env :
      handle ->
      ?xaxis:bool ->
      ?xgrid:bool ->
      ?xlog:bool ->
      float ->
      float ->
      ?yaxis:bool -> ?ygrid:bool -> ?ylog:bool -> float -> float -> unit
    val fx :
      handle ->
      ?tag:int ->
      ?style:style ->
      ?label:string ->
      ?nsamples:int -> (float -> float) -> float -> float -> unit
    val xy_param :
      handle ->
      ?tag:int ->
      ?style:style ->
      ?label:string ->
      ?nsamples:int -> (float -> float * float) -> float -> float -> unit
    val xy_file :
      handle -> ?tag:int -> ?style:style -> ?label:string -> string -> unit
    val box3 :
      ?x:axis_opt list ->
      ?y:axis_opt list -> ?z:axis_opt list -> handle -> unit
    val env3 :
      handle ->
      ?xaxis:bool ->
      ?xgrid:bool ->
      ?xlog:bool ->
      float ->
      float ->
      ?yaxis:bool ->
      ?ygrid:bool ->
      ?ylog:bool ->
      float ->
      float ->
      ?zaxis:bool -> ?zgrid:bool -> ?zlog:bool -> float -> float -> unit
    val fxy :
      handle ->
      ?tag:int ->
      ?style:style ->
      ?label:string ->
      ?xnsamples:int ->
      ?ynsamples:int ->
      (float -> float -> float) -> float -> float -> float -> float -> unit
    val fxy_param :
      handle ->
      ?tag:int ->
      ?style:style ->
      ?label:string ->
      ?xnsamples:int ->
      ?ynsamples:int ->
      (float -> float -> float * float * float) ->
      float -> float -> float -> float -> unit
    val xyz_ft :
      handle ->
      ?tag:int ->
      ?style:style ->
      ?label:string ->
      ?tnsamples:int ->
      (float -> float * float * float) -> float -> float -> unit
    type vec = D.vec
    type vec2 = D.vec2
    type vec4 = D.vec4
    type mat = D.mat
    val x :
      handle ->
      ?tag:int -> ?style:style -> ?label:string -> ?n0:int -> vec -> unit
    val xy :
      handle -> ?tag:int -> ?style:style -> ?label:string -> vec2 -> unit
    val bin : handle -> ?tag:int -> ?label:string -> vec2 -> unit
    val vector : handle -> ?tag:int -> ?label:string -> vec4 -> unit
    val err : handle -> ?tag:int -> vec4 -> unit
    val xyz :
      handle ->
      ?tag:int -> ?style:style -> ?label:string -> vec -> vec -> mat -> unit
  end