package archimedes
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:Arrows.style ->
?stop:Arrows.style ->
?tics:Tics.t ->
?offset:offset ->
Viewport.t ->
unit
x vp
adds an x-axis to the viewport vp
.
val y :
?grid:bool ->
?major:(string * float) ->
?minor:(string * float) ->
?start:Arrows.style ->
?stop:Arrows.style ->
?tics:Tics.t ->
?offset:offset ->
Viewport.t ->
unit
y vp
adds an y-axis to the viewport vp
.
val box : ?grid:bool -> ?tics:Tics.t -> ?tics_alt:Tics.t -> 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.
val cross : ?tics:Tics.t -> Viewport.t -> unit
cross vp
A default axes system consisting of two axes, centered on the origin ((0, 0) in Data coordinates).