@gnuplot(data:tab) @gnuplot(title:string, data:tab) @gnuplot(time:tab, data:tab) @gnuplot(title:string, time:tab, data:tab) @gnuplot(title1:string, time1:tab, data1:tab, title2: string, time2:tab, data2:tab, ...)
The function @gnuplot plots the elements in the
data tab as a time
data is a tab of numeric values, a simple curve is plotted:
e of index
i gives a point of coordinate
(i, e). If
data is a tab of tab (of
p numeric values),
p curves are plotted
on the same window.
Each @gnuplot invocation lead to a new window. The invocation is done asynchrounously: when the function returns, the plot process is still running for its completion.
Function @gnuplot returns
true if the plot succeeded,
To work, the gnuplot program must be installed on the system Cf. http://www.gnuplot.info and must be visible from the Antescofo object (on a Mac system, it can be installed through fink, macport or brew; on linux, it can be installed through the package management system). They are several ways to make this command visible and the search of a gnuplot executable is done in this order:
set the global variable
$gnuplot_pathto the absolute path of the gnuplot executable (in the form of a string);
alternatively, set the environment variable
GNUPLOTof the shell used to launch the Antescofo standalone or the Max/PD host of the Antescofo object, to the absolute path of the gnuplot executable;
alternatively make visible the gnuplot executable visible from the shell used by the user shell to launch the Antescofo standalone or the Max/PD host of the Antescofo object (e.g. through the
The command is launched on a shell with the option
-persistent and the absolute path of the gnuplot command
The data are tabulated in a file
(where n is an integer) in a format suitable for gnuplot.
The gnuplot commands used to plot the data are in the file
These two files persists between two Antescofo session and can then
be used to plot with other option.
$gnuplot_linestyle can be used to change the
style of the lines used to conect the data points. The value must be as
string giving the gnuplot name of the choosen style. The default value is
"linespoints". Other possible values are:
see Gnuplot Plot style.
same as the previous form, but the first argument is used as the label
of the plotted curve. If
data is a tab of tab, (e.g. the
history of a tab valued variable), then the label of each curve takes
plots the points
time[i], data[i]). As for the previous form,
can be a tab of tab (of numeric values). The
time tab corresponds to
x coordinates of the plot and must be a tab of numeric values.
@gnuplot(title:string, time:tab, data:tab)
Same as the previous entry but the first argument is used as the label of the curve(s).
@gnuplot(title1:string, time1:tab, data1:tab, title2: string, time2:tab, data2:tab, ...)
In this variant, several curves are plotted in the same window. One
curve is specified by 2 or 3 consecutive arguments. Three arguments are
used if the first considered argument is a string: in this case, this
argument is the label of the curve. The following argument is used as
x coordinates and the next one as the
y coordinates of the
plotted point. The tab arguments must be tab of numeric values (they
cannot be tab of tab).
See Data Exchange Functions: @dump, @dumpvar, @gnuplot, @json_read, @json_string, @json_write, @loadvalue, @loadvar, @nim2vezer @plot, @rplot, @savevalue, @set_osc_handling_double, @set_osc_handling_int64, @set_osc_handling_tab, @string2fun, @string2obj, @string2proc @xml_read @xml_string