mlpost

OCaml library on top of Metapost
Library mlpost
Module Mlpost . Hist

This module draws histograms.

type 'a labels =
| Values
| User of 'a list
val simple : ?width:Num.t -> ?height:Num.t -> ?padding:Num.t -> ?fill:Color.t list -> ?perspective:bool -> ?hcaption:Picture.t -> ?vcaption:Picture.t -> ?histlabel:(Command.vposition * Picture.t labels) -> ?vlabel:Plot.labels -> ?hlabel:Picture.t list -> float list -> Command.t

simple l draws an histogram from a list l of floating-point values.

  • parameter width

    Total width of the histogram (default: 100 bp)

  • parameter height

    Total height for the histogram (default: 200 bp)

  • parameter fill

    The colors used to draw the successive blocks; it is used circularly

  • parameter padding

    Horizontal space between two blocks

  • parameter hcaption

    See module Plot

  • parameter vcaption

    See module Plot

  • parameter hlabel

    Labels for each block

  • parameter vlabel

    See module Plot

  • parameter histlabel

    Add a label to each block; the first component controls the placement of the label; the second component, of type insideBox, controls the label itself, which is either the numerical value of the block (i.e. the float) or a user picture

val compare : ?width:Num.t -> ?height:Num.t -> ?padding:Num.t -> ?fill:Color.t list -> ?perspective:bool -> ?hcaption:Picture.t -> ?vcaption:Picture.t -> ?histlabel:(Command.vposition * Picture.t list labels) -> ?vlabel:Plot.labels -> ?hlabel:Picture.t list -> float list list -> Command.t

compare l draws a comparative histogram from a list l of floating-point lists. For optional arguments, see function simple above.

val stack : ?width:Num.t -> ?height:Num.t -> ?padding:Num.t -> ?fill:Color.t list -> ?perspective:bool -> ?hcaption:Picture.t -> ?vcaption:Picture.t -> ?histlabel:(Command.vposition * Picture.t list labels) -> ?vlabel:Plot.labels -> ?hlabel:Picture.t list -> float list list -> Command.t

compare l draws a stacked histogram from a list l of floating-point lists. For optional arguments, see function simple above.