Dear Ryanthank you for the reply, but I think I will explain the problem little more specificallyhere i am having 36 points in my x-axis (attached as hval)and I have tried to find out the frequency per year (1900-2100 which means 201yrs) by running the below command. But I am getting values for the years which don't have any occurrence just the same as the previous year frequency (attachment frequency.txt). I want those years with zero frequency as the number zero only not the value from previous year.code:DEFINE AXIS/X occurences = hval[x=1:33]LET pdf = I[gx=occurences]DEFINE AXIS/X=1900:2100:1 my_intervalslet frequency=pdf[gx=my_intervals@sum]thanksgopikaOn Mon, Dec 2, 2019 at 11:35 AM Ryo Furue <furue@xxxxxxxxxx> wrote:Dear Gopika,On Sun, Dec 1, 2019 at 11:32 AM gopika suresh <gopikasurvay@xxxxxxxxx> wrote:If some value is there in any year then it will be increasing otherwise straight line.
Basically, the @RSUM does that, if I understand your requirements correctly:yes? let events = {1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 1}yes? plot/symbols/lines events, events[i=@RSUM]The problem is that Ferret defines RSUM on the "wrong" gridpoints. You want to shift it to the left by half gridspacing. To do so would require a bit of complicated manipulation . . . and you also want the initial value of the cumulative sum to be zero. . . . (Personally, I would write the values to a text file, read it by a program and compute the cumulative sum, and plot the result with gnuplot.)Cheers,Ryo--Gopz