diff options
-rw-r--r-- | README | 33 | ||||
-rw-r--r-- | example.csv | 106 |
2 files changed, 139 insertions, 0 deletions
@@ -0,0 +1,33 @@ | |||
1 | This is a simple, quick-n-dirty wrapper for plotting .csv files with | ||
2 | Gnuplot. | ||
3 | |||
4 | The tool will remove comments (lines starting with a '#' character) before | ||
5 | passing the data to Gnuplot. This makes it possible to have experimental | ||
6 | setup and date information encoded in the .csv file, which is beneficial | ||
7 | for archival reasons. | ||
8 | |||
9 | You can plot the example file to a PNG graph using the following command: | ||
10 | |||
11 | ./gnuplot.py -o example -f png --xlabel "Time" --ylabel "Supply Bound" \ | ||
12 | example.csv 1 2 "Supply Bound Function" | ||
13 | |||
14 | |||
15 | In general, each curve that you want to plot in a graph is defined by four | ||
16 | arguments: | ||
17 | |||
18 | ./gnuplot.py [OPTIONS] \ | ||
19 | <file1> <xcolumn1> <ycolumn1> <title1> \ | ||
20 | <file2> <xcolumn2> <ycolumn2> <title2> \ | ||
21 | ... and so on ... | ||
22 | |||
23 | For large experiments with many graphs, it is more convenient to wrap gnuplot.py | ||
24 | in a project-specific plotting script. Have a look at plot.py and plot_ohead.py | ||
25 | to see how I did it. Basically, the scrips infer what to plot and how to name | ||
26 | and label the graphs from the name of each .csv file. | ||
27 | |||
28 | For example, the file name 'hard_rtss09_dist=uni_medium_250.csv' encodes the | ||
29 | following information: 1) it uses hard real-time schedulability tests, it was | ||
30 | using the RTSS'09 experimental setup and overheads, the task sets were generated | ||
31 | with uniform utilization from the range [0.1, 0.4] (medium), and periods were | ||
32 | distributed uniformly in [50, 250]. This is parsed by plot.py, which then | ||
33 | calls gnuplot.py to generate a graph with the correct labels and settings. | ||
diff --git a/example.csv b/example.csv new file mode 100644 index 0000000..0c70bd7 --- /dev/null +++ b/example.csv | |||
@@ -0,0 +1,106 @@ | |||
1 | # This is the result of sampling a simple supply bound function. | ||
2 | # As defined in Sanjoy's G-EDF paper. | ||
3 | |||
4 | # first column: time | ||
5 | # second column: supply bound | ||
6 | 0, 0.000000 | ||
7 | 1, 0.000000 | ||
8 | 2, 0.000000 | ||
9 | 3, 0.000000 | ||
10 | 4, 0.000000 | ||
11 | 5, 0.000000 | ||
12 | 6, 0.000000 | ||
13 | 7, 0.000000 | ||
14 | 8, 0.000000 | ||
15 | 9, 0.000000 | ||
16 | 10, 0.000000 | ||
17 | 11, 0.000000 | ||
18 | 12, 0.000000 | ||
19 | 13, 0.000000 | ||
20 | 14, 0.000000 | ||
21 | 15, 1.000000 | ||
22 | 16, 5.000000 | ||
23 | 17, 9.000000 | ||
24 | 18, 9.000000 | ||
25 | 19, 9.000000 | ||
26 | 20, 9.000000 | ||
27 | 21, 9.000000 | ||
28 | 22, 9.000000 | ||
29 | 23, 9.000000 | ||
30 | 24, 9.000000 | ||
31 | 25, 10.000000 | ||
32 | 26, 14.000000 | ||
33 | 27, 18.000000 | ||
34 | 28, 18.000000 | ||
35 | 29, 18.000000 | ||
36 | 30, 18.000000 | ||
37 | 31, 18.000000 | ||
38 | 32, 18.000000 | ||
39 | 33, 18.000000 | ||
40 | 34, 18.000000 | ||
41 | 35, 19.000000 | ||
42 | 36, 23.000000 | ||
43 | 37, 27.000000 | ||
44 | 38, 27.000000 | ||
45 | 39, 27.000000 | ||
46 | 40, 27.000000 | ||
47 | 41, 27.000000 | ||
48 | 42, 27.000000 | ||
49 | 43, 27.000000 | ||
50 | 44, 27.000000 | ||
51 | 45, 28.000000 | ||
52 | 46, 32.000000 | ||
53 | 47, 36.000000 | ||
54 | 48, 36.000000 | ||
55 | 49, 36.000000 | ||
56 | 50, 36.000000 | ||
57 | 51, 36.000000 | ||
58 | 52, 36.000000 | ||
59 | 53, 36.000000 | ||
60 | 54, 36.000000 | ||
61 | 55, 37.000000 | ||
62 | 56, 41.000000 | ||
63 | 57, 45.000000 | ||
64 | 58, 45.000000 | ||
65 | 59, 45.000000 | ||
66 | 60, 45.000000 | ||
67 | 61, 45.000000 | ||
68 | 62, 45.000000 | ||
69 | 63, 45.000000 | ||
70 | 64, 45.000000 | ||
71 | 65, 46.000000 | ||
72 | 66, 50.000000 | ||
73 | 67, 54.000000 | ||
74 | 68, 54.000000 | ||
75 | 69, 54.000000 | ||
76 | 70, 54.000000 | ||
77 | 71, 54.000000 | ||
78 | 72, 54.000000 | ||
79 | 73, 54.000000 | ||
80 | 74, 54.000000 | ||
81 | 75, 55.000000 | ||
82 | 76, 59.000000 | ||
83 | 77, 63.000000 | ||
84 | 78, 63.000000 | ||
85 | 79, 63.000000 | ||
86 | 80, 63.000000 | ||
87 | 81, 63.000000 | ||
88 | 82, 63.000000 | ||
89 | 83, 63.000000 | ||
90 | 84, 63.000000 | ||
91 | 85, 64.000000 | ||
92 | 86, 68.000000 | ||
93 | 87, 72.000000 | ||
94 | 88, 72.000000 | ||
95 | 89, 72.000000 | ||
96 | 90, 72.000000 | ||
97 | 91, 72.000000 | ||
98 | 92, 72.000000 | ||
99 | 93, 72.000000 | ||
100 | 94, 72.000000 | ||
101 | 95, 73.000000 | ||
102 | 96, 77.000000 | ||
103 | 97, 81.000000 | ||
104 | 98, 81.000000 | ||
105 | 99, 81.000000 | ||
106 | |||