-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebgl_plot_export.mli
104 lines (80 loc) · 2.26 KB
/
webgl_plot_export.mli
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
(* This file is released under the terms of an MIT-like license. *)
(* See the attached LICENSE file. *)
(* Copyright 2016 by LexiFi. *)
(** Serializable description of plots. *)
(** Description of histograms. *)
module Histogram : sig
type t =
| Grid of {
name: string option;
x: float array;
z: float array;
y: float array array;
border: float option;
widths: float array array option;
depths: float array array option;
floors: float array array option;
colors: (float * float * float) array array option;
} [@js "grid"]
| List of {
name: string option;
border: float option;
centers: (float * float * float) array;
widths: float array option;
depths: float array option;
floors: float array option;
colors: (float * float * float) array option;
} [@js "list"]
| Unknown of Ojs.t [@js.default]
[@@js.sum "representation"]
(**/**)
val t_to_js: t -> Ojs.t
val t_of_js: Ojs.t -> t
(**/**)
end
(** Description of surfaces. *)
module Surface : sig
type t =
| Grid of {
name: string option;
centers: (float * float * float) array array;
colors: (float * float * float) array array option;
alpha: float option;
wireframe: bool option;
crosshair: bool option;
magnetic: bool option;
}[@js "grid"]
| Unknown of Ojs.t [@js.default]
[@@js.sum "representation"]
(**/**)
val t_to_js: t -> Ojs.t
val t_of_js: Ojs.t -> t
(**/**)
end
type series =
| Histogram of Histogram.t [@js.arg "data"][@js "histogram"]
| Surface of Surface.t [@js.arg "data"][@js "surface"]
| Unknown of Ojs.t [@js.default]
[@@js.sum]
type tick = {
value: float;
label: string;
}
type axis_option = {
label: string option;
ticks: tick list option;
bounds: (float * float) option;
}
type chart = {
x_axis: axis_option option;
y_axis: axis_option option;
z_axis: axis_option option;
series: series list;
ratio: (float * float * float) option;
}
(**/**)
val chart_to_js: chart -> Ojs.t
val chart_of_js: Ojs.t -> chart
val tick_to_js: tick -> Ojs.t
val tick_of_js: Ojs.t -> tick
(**/**)