mirror of
git://projects.qi-hardware.com/wernermisc.git
synced 2024-12-19 16:13:09 +02:00
m1rc3/norruption/2/plot-cdf: added option -i to interpolate empirical results
This commit is contained in:
parent
a83a711733
commit
13479e1862
@ -1,4 +1,19 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
sub usage
|
||||
{
|
||||
print STDERR "usage: $0 [-i] [log_file]\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
$with = "steps";
|
||||
if ($ARGV[0] eq "-i") {
|
||||
shift @ARGV;
|
||||
$with = "lines";
|
||||
}
|
||||
&usage if $ARGV[0] =~ /^-/;
|
||||
|
||||
$n = 1;
|
||||
while (<>) {
|
||||
next unless /^=== (\d+) ===/;
|
||||
@ -25,7 +40,7 @@ $cmd = "|gnuplot -e '".
|
||||
'set xlabel "Power cycles";'.
|
||||
'set ylabel "Cumulative probability";'.
|
||||
'set key bottom;'.
|
||||
'plot "-" with steps title "Empirical distribution (N='.@f.')", '.
|
||||
'plot "-" with '.$with.' title "Empirical distribution (N='.@f.')", '.
|
||||
'1-exp(-'.1/$f.'*x) with lines lt 3 '.
|
||||
'title "Exponential distribution ({/Symbol l}=1/'.$f.')"'.
|
||||
"'";
|
||||
|
Loading…
Reference in New Issue
Block a user