Как построить дискретный набор данных с 3 или более столбцами?MWE выглядит следующим образом:
/* Required essentially to create the data set */
eqn1: 4 - x^2 - 4*y^2$
eqn2: y^2 - x^2 + 1$
sol: rk([eqn1,eqn2],[x,y],[-1.25, 0.75],[t,0,4,0.2])$
/* My current workaround to plot (x vs t) and (y vs t) */
n : length(sol)$
/* Select the ith column and create separate lists */
tseries : makelist(sol[i][1], i, 1, n)$
xseries: makelist(sol[i][2], i, 1, n)$
yseries: makelist(sol[i][3], i, 1, n)$
plot2d([
[discrete, tseries, xseries],
[discrete, tseries, yseries]
], [legend,"x","y"] ,[xlabel,"t"], [ylabel,"x, y"],[style,
[linespoints,2,2]],
[gnuplot_preamble,"set key box width 2 spacing 1.3 top left"])$
Есть ли лучшее решение для построения без создания списков tseries
, xseries
и yseries
?