File: testcase.tex

package info (click to toggle)
libsdsl 2.1.1%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 3,980 kB
  • sloc: cpp: 42,286; makefile: 1,171; ansic: 318; sh: 201; python: 27
file content (63 lines) | stat: -rw-r--r-- 1,891 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% This file declares a macro for showing the results of one test case.
% macro expects testcase name as parameter.
\newcommand{\showTestcaseResult}[1]{
\section{#1 Result}

%draw first picture containing coding rates
\begin{figure}[htb]
\begin{tikzpicture}[use background]
\begin{axis}[
	width=.75\textwidth,
	xbar, 
	xmin=0,
	xlabel= {Rate (MB/s)},
	xmajorgrids=true,
	enlarge x limits={value=0.2, upper},
	y=1cm,
	enlarge y limits={true, abs value=0.75},
	ytick=data,
	yticklabels from table={\vectortable}{vector},
	y tick label style={major tick length=0pt},
	y dir=reverse,
	legend style={cells={anchor=east},legend pos=outer north east},
	legend reversed=true,
	nodes near coords,
	nodes near coords align={horizontal}]
\addplot[draw=black,fill=red,discard if not={testcase}{#1}] table
	[x=decodingrate,y expr=\coordindex,col sep=semicolon,trim cells] 
	{../results/result.csv};
\addplot[draw=black,fill=blue,discard if not={testcase}{#1}] table
	[x=encodingrate,y expr=\coordindex,col sep=semicolon,trim cells] 
	{../results/result.csv};
\legend{Decoding,Encoding};
\end{axis}
\end{tikzpicture}
\caption{Coding Rates on Testcase #1}
\end{figure}

%and second picture containing compression rate
\begin{figure}[htb]
\begin{tikzpicture}[use background]
\begin{axis}[
	width=.75\textwidth,
	xbar, 
	xmin=0,
	xlabel= {Compression (in percentage)},
	xmajorgrids=true,
	enlarge x limits={value=0.2, upper},
	y=0.6cm,
	enlarge y limits={true, abs value=0.75},
	ytick=data,
	yticklabels from table={\vectortable}{vector},
	y tick label style={major tick length=0pt},
	y dir=reverse,
	nodes near coords,
	nodes near coords align={horizontal}]
\addplot[draw=black,fill=green,discard if not={testcase}{#1}] table
	[x=compressionrate,y expr=\coordindex,col sep=semicolon,trim cells] 
	{../results/result.csv};
\end{axis}
\end{tikzpicture}
\caption{Compression Rate on Testcase #1}
\end{figure}
}