Module Hugin.Figure
Module for figure-level operations (the top-level canvas).
val create : ?width:int -> ?height:int -> unit -> tcreate ?width ?height ()
Create a new figure canvas.
Parameters
?width: figure width in pixels (default 800).?height: figure height in pixels (default 600).
Returns
- a new
Figure.tinstance.
Examples
let fig = create ~width:1024 ~height:768 () in
...val add_axes :
left:float ->
bottom:float ->
width:float ->
height:float ->
?projection:Axes.projection ->
t ->
Axes.tadd_axes ~left ~bottom ~width ~height ?projection fig
Add custom-positioned axes to the figure.
Parameters
left: distance from left edge (0.0 to 1.0 fraction).bottom: distance from bottom edge.width: width of axes as fraction of figure.height: height of axes as fraction of figure.?projection:TwoDorThreeD(defaultTwoD).fig: parent figure.
Returns
- new
Axes.tplaced on the figure.
Examples
let ax = add_axes ~left:0.1 ~bottom:0.1 ~width:0.8 ~height:0.8 fig in
...val add_subplot :
?nrows:int ->
?ncols:int ->
?index:int ->
?projection:Axes.projection ->
t ->
Axes.tadd_subplot ?nrows ?ncols ?index ?projection fig
Add a subplot in a grid layout to the figure.
Parameters
?nrows: number of rows in grid (default 1).?ncols: number of columns (default 1).?index: position index (1-based, default 1).?projection:TwoDorThreeDaxes type.fig: parent figure.
Returns
- new
Axes.tfor the subplot.
Examples
let ax = add_subplot ~nrows:2 ~ncols:2 ~index:3 fig in
...