@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, ...)
@gnuplot(data:tab)
data
tab as a time
series. If data
is a tab of numeric values, a simple curve is plotted:
an element 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,
and false
elsewhere.
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_path
to the absolute path of the gnuplot executable (in the form of a string); -
alternatively, set the environment variable
GNUPLOT
of 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
PATH
shell variable).
The command is launched on a shell with the option
-persistent
and the absolute path of the gnuplot command
file.
The data are tabulated in a file /tmp/tmp.antescofo.data.n
(where n is an integer) in a format suitable for gnuplot.
The gnuplot commands used to plot the data are in the file
/tmp/tmp.antescofo.gnuplot.n
.
These two files persists between two Antescofo session and can then
be used to plot with other option.
The variable $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:
"dots"
,
"points"
,
"linespoints"
,
"impulses"
,
"steps"
,
"fsteps"
,
"histeps"
,
see Gnuplot Plot style.
The @gnuplot function is overloaded and accepts a variety of arguments described below. The @gnuplot function is used internally by the special forms @plot and @rplot.
@gnuplot(title:string, data:tab)
data
is a tab of tab, (e.g. the
history of a tab valued variable), then the label of each curve takes
the form title_i
.
@gnuplot(time:tab, data:tab)
time[i], data[i])
. As for the previous form, data
can be a tab of tab (of numeric values). The time
tab corresponds to
the x
coordinates of the plot and must be a tab of numeric values.
@gnuplot(title:string, time:tab, data:tab)
@gnuplot(title1:string, time1:tab, data1:tab, title2: string, time2:tab,
data2:tab, ...)
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 @parse @plot @read_file @rplot @savevalue @set_osc_handling_double @set_osc_handling_int64 @set_osc_handling_tab @string2fun @string2obj @string2proc @to_num @xml_read @xml_string