|
From: <pl...@pi...> - 2011-10-04 15:42:35
|
On 10/04/11 17:28, Ethan Merritt wrote: > On Tuesday, 04 October 2011, pl...@pi... wrote: >> Hi, >> >> I have found what appears to be a defect in variable assignments in plot. >> >> gauss0(x)=a0*exp(-(x-pk0)**2/b0)+c0 >> a1=a0;b1=b0;c1=c0;pk0=-141; >> add_one(x)=area0=1; > > This defines the function add_one(x) > to be add_one(x) = value of (area0=1) > = 1 > So add_one(x) = 1 for all x Exactly, so why is area still 0 after having been assigned the value 1 about 512 times?! I reiterate that if I remove the function plot I do get areas=1 after plotting. This indicates that plot is re-executing area0=0 after the second data plot and before plotting the function. /Peter. > Any later changes to the value of area0 are not relevant. > > Ethan > >> plot area0=0\ >> , datafile using 1:(add_one($2)) w l\ >> , datafile using 1:(($2)) w l\ >> , gauss0(x) tit 'fitted peak0'\ >> >> print "area0=",area0; >> >> I was expecting this to do the assignment area0=0 once and once only >> before any of the lines were plotted. >> >> It is only assigned once for the datafile plots but adding the function >> plot causes this snippet to print a value of zero , not one. >> >> I am inferring that using a mix of data and function plots is causing >> the initial assignment to be done twice. Bug or feature? >> >> best regards, Peter. >> >> ------------------------------------------------------------------------------ >> All the data continuously generated in your IT infrastructure contains a >> definitive record of customers, application performance, security >> threats, fraudulent activity and more. Splunk takes this data and makes >> sense of it. Business sense. IT sense. Common sense. >> http://p.sf.net/sfu/splunk-d2dcopy1 >> _______________________________________________ >> gnuplot-beta mailing list >> gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-beta >> > > |