help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlight a specific point in the graph


From: Przemek Klosowski
Subject: Re: Highlight a specific point in the graph
Date: Tue, 11 Mar 2008 09:28:02 -0400 (EDT)

Leandro asked
   >  I have a graph x=time, y=throughput. Consider the workload below,
   >  where in the first column we have the time in seconds and in the
   >  second column the throughput in Kbits/s (just to contextualize):
   >
   >  x  y
   >  -------
   >  1  10
   ....
   >  4  1
   >  5  16
   ....
   >
   >  In this example realize that in x=4 seconds the throughput is so
   >  allow, y=1 Kbits/s, if we compare with the other (x, y) points, where
   >  the throughput ranges between 12 and 17 Kbits/s. I want to plot a
   >  graph and highlight (using a arrow, a triangle, a circle, ...) that

and Michael suggested:

   idx = [4, 8];
   plot (x, y);
   hold on;
   plot (x(idx), y(idx), 'o');

Of course the indices of 'low' numbers can be calculated numerically:

   sigma=1; # your desired significance level
   idx = ( abs(y-mean(y)) > sigma*std(y) );

or even some more robust technique that tries to prevent outliers from
influencing the mean, like:

   robust_mean = mean(  y( abs(y-mean(y)) < std(y) ) );
   idx = ( abs(y-robust_mean) > sigma*std(y) );

I am sure the statisticians here will come up with better approaches,


reply via email to

[Prev in Thread] Current Thread [Next in Thread]