File "plot"

This file provides a plotting of a graph. The graph data is provided by a list of lists of the form [X, Y1, .., Yn]. The x-axis and y-axis bounds are automatically computed and first rendered. The results are then multiple line plots for the sequences (X,Y1), …, (X,Yn). The display can be further refined by specifying plot options.

The following plot predicates are provided:

plot(D, L):
plot(S, D, L):
The predicate succeeds. As a side effect a line plot for the data D and plotting options L is created as a SVG graphics element. The ternary predicate allows specifying a markup writer S. Besides SVG view options, the following options are supported:

render(Ts): The render types Ts, i.e. area, bars or none, default plot.
decor(Ts): The decor types Ts, i.e. square, triangle or none, default circle.
xaxis(Ls): The x-axis labels Ls, i.e. number atom pairs list, default [].
yaxis(Ls): The y-axis labels Ls, i.e. number atom pairs list, default [].
mark(Cs): The fill classes Cs, default mark and mark2.
line(Cs): The stroke classes Cs, default line and line2.
minx(X): The minimum x-coordinate X, default is -1.
maxx(X): The maximum x-coordinate X, default is 1.
miny(Y): The minimum y-coordinate Y, default is -1.
maxy(Y): The maximum y-coordinate Y, default is 1.

plot_begin(S):
plot_begin(S, L):
The predicate succeeds. As a side effect the axes for the plotting options L are created as a SVG graphics element. The binary predicate allows specifying a markup writer S.
plot_add(D, L):
plot_add(S, D, L):
The predicate succeeds. As a side effect a line plot for the data D and plotting options L is added to the SVG graphics element. The ternary predicate allows specifying a markup writer S.
plot_end:
plot_end(S):
The predicate succeeds as a side effect the SVG graphics element is closed. The unary predicate allows specifying a markup writer S.

Use Privacy (c) 2005-2026 XLOG Technologies AG