Date:2011-10-12 05:29:07 (8 years 2 days ago)
Author:Werner Almesberger
Commit:13479e1862472cb45f84a984c02de0eecfd83be5
Message:m1rc3/norruption/2/plot-cdf: added option -i to interpolate empirical results

Files: m1rc3/norruption/2/plot-cdf (2 diffs)

Change Details

m1rc3/norruption/2/plot-cdf
11#!/usr/bin/perl
2
3sub usage
4{
5    print STDERR "usage: $0 [-i] [log_file]\n";
6    exit(1);
7}
8
9
10$with = "steps";
11if ($ARGV[0] eq "-i") {
12    shift @ARGV;
13    $with = "lines";
14}
15&usage if $ARGV[0] =~ /^-/;
16
217$n = 1;
318while (<>) {
419    next unless /^=== (\d+) ===/;
...... 
2540    'set xlabel "Power cycles";'.
2641    'set ylabel "Cumulative probability";'.
2742    'set key bottom;'.
28    'plot "-" with steps title "Empirical distribution (N='.@f.')", '.
43    'plot "-" with '.$with.' title "Empirical distribution (N='.@f.')", '.
2944      '1-exp(-'.1/$f.'*x) with lines lt 3 '.
3045      'title "Exponential distribution ({/Symbol l}=1/'.$f.')"'.
3146    "'";

Archive Download the corresponding diff file

Branches:
master



interactive