Module Archimedes.Axes


module Axes: sig .. end
Routines to draw basic axes systems in a 2-dimensional space. One can either draw axes separately using add_(x|y)_axis or use a full default axes system with box or cross.


type offset =
| Relative of float (*A relative offset is given in the Data coordinate system. So you can ensure that the axis is drawn at the other axis' origin (offset: Relative 0.)*)
| Absolute of float (*An absolute offset is given in the Graph coordinate system and should have a value between 0 and 1. Using this kind of offset, one can ensure to always get the same rendering*)
The axis can be padded using an offset. It is used to control where to place the axis (according to the other axis)
val x : ?grid:bool ->
?major:string * float ->
?minor:string * float ->
?start:Archimedes.Arrows.style ->
?stop:Archimedes.Arrows.style ->
?tics:Archimedes.Tics.t ->
?offset:offset -> Archimedes.Viewport.t -> unit
x vp adds an x-axis to the viewport vp.
major : is a couple (mark, size) drawn at each major tic position.
start : the arrow ending style on the left (x0) (see the Arrows module)
stop : the arrow ending style on the right (xend) (see the Arrows module)
tics : the "tics policy" for this axis (see the Tics module)
offset : where to place the axis (y-coordinate)
val y : ?grid:bool ->
?major:string * float ->
?minor:string * float ->
?start:Archimedes.Arrows.style ->
?stop:Archimedes.Arrows.style ->
?tics:Archimedes.Tics.t ->
?offset:offset -> Archimedes.Viewport.t -> unit
y vp adds an y-axis to the viewport vp.
start : the arrow ending style on the bottom (y0) (see the Arrows module)
stop : the arrow ending style on the top (yend) (see the Arrows module)
tics : the "tics policy" for this axis (see the Tics module)
offset : where to place the axis (x-coordinate)
val box : ?grid:bool ->
?tics:Archimedes.Tics.t ->
?tics_alt:Archimedes.Tics.t -> Archimedes.Viewport.t -> unit
box vp A default system of axes consisting of four axes, one on each border of the viewport vp, resulting in a box surrounding the viewport.
tics : the "tics policy" for the left and bottom axes (see the Tics module for more information over tics policies)
tics_alt : the "tics policy" for the right and top axes (see the Tics module for more information over tics policies)
val cross : ?tics:Archimedes.Tics.t -> Archimedes.Viewport.t -> unit
cross vp A default axes system consisting of two axes, centered on the origin ((0, 0) in Data coordinates).
tics : the "tics policy" of the axes (see the Tics module for more information over tics policies)