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