plot2d



On 04/11/2012 04:26 PM, Sara Pashmin wrote:
> I try to plot results of an calculation in a loop like the following example:
>
> for i:1 thru 5 step 1 do
> (x:i*3,
> y:i,
> plot2d([discrete, [[x, y]]],[color,cyan],
>          [xlabel,"Ux (V)"],
>          [ylabel,"Uy (V)"],[style, points],
> [gnuplot_preamble,
> "set nokey;
> set title 'output voltage'"]));
>
> But I get the plotting of the last result, that means for i:5:
> the plotting of the point (Ux=15, Uy=5)
>
> I would be thankful for any help
Hi,
I think this is what you wanted to do:

plot2d([discrete, makelist ([3*i,i],i,1,5)], [color,cyan],
         [xlabel,"Ux (V)"],
         [ylabel,"Uy (V)"],[style, points],
[gnuplot_preamble,
"set nokey;
set title 'output voltage'"]);

You do not want five plots, each one with only one point, but only one 
plot with five points in it.
Regards,
Jaime