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 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
|
\documentclass[a4paper]{report}
\usepackage{pgfplots}
\pgfplotsset{compat=1.3}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xbar,
width=12cm,
height=3.5cm,
enlarge y limits=0.5,
xlabel={\#participants},
xmin=0,
symbolic y coords={no,yes},
ytick=data,
nodes near coords,
nodes near coords align={horizontal},
]
\addplot coordinates {(3,no) (7,yes)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
xbar,
width=12cm,
height=3.5cm,
enlarge y limits=0.5,
xlabel={\#participants},
symbolic y coords={no,yes},
ytick=data,
nodes near coords,
nodes near coords align={horizontal},
]
\addplot coordinates {(1,no) (9,yes)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
xbar,
width=12cm,
height=3.5cm,
enlarge y limits=0.5,
xlabel={\#participants},
xmin=0,
symbolic y coords={set A,set B},
ytick=data,
nodes near coords,
nodes near coords align={horizontal},
]
\addplot coordinates {(6,set A) (4,set B)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
xlabel={\# of bananas},
ylabel={\#participants},
ytick={0,1,2,3},
ymin=0,
symbolic x coords={1,2,3,4,5,more},
nodes near coords,
]
\addplot coordinates {(1,1) (2,1) (3,3) (4,2) (5,1) (more,2)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
ybar stacked,
enlargelimits=0.15,
legend style={at={(0.5,-0.20)},
anchor=north,legend columns=-1},
ylabel={\#participants},
symbolic x coords={tool1, tool2, tool3, tool4, tool5, tool6, tool7},
xtick=data,
x tick label style={rotate=45,anchor=east},
]
\addplot+[ybar] plot coordinates {(tool1,0) (tool2,2) (tool3,2) (tool4,3) (tool5,0) (tool6,2) (tool7,0)}; % never
\addplot+[ybar] plot coordinates {(tool1,0) (tool2,0) (tool3,0) (tool4,3) (tool5,1) (tool6,1) (tool7,0)}; % rarely
\addplot+[ybar] plot coordinates {(tool1,6) (tool2,6) (tool3,8) (tool4,2) (tool5,6) (tool6,5) (tool7,6)}; % sometimes
\addplot+[ybar] plot coordinates {(tool1,4) (tool2,2) (tool3,0) (tool4,2) (tool5,3) (tool6,2) (tool7,4)}; % often
\legend{never, rarely, sometimes, often}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.5,-0.15)},
anchor=north,legend columns=-1},
ylabel={\#participants},
symbolic x coords={tool8,tool9,tool10},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
]
\addplot coordinates {(tool8,7) (tool9,9) (tool10,4)};
\addplot coordinates {(tool8,4) (tool9,4) (tool10,4)};
\addplot coordinates {(tool8,1) (tool9,1) (tool10,1)};
\legend{used,understood,not understood}
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.5,-0.2)},
anchor=north,legend columns=-1},
ylabel={\#participants},
symbolic x coords={excellent,good,neutral,not good,poor},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
x tick label style={rotate=45,anchor=east},
]
\addplot coordinates {(excellent,0) (good,8) (neutral,2) (not good,0) (poor,0)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
ybar,
enlargelimits=0.15,
legend style={at={(0.5,-0.2)},
anchor=north,legend columns=-1},
ylabel={\#participants},
symbolic x coords={excellent,good,neutral,not good,poor},
xtick=data,
nodes near coords,
nodes near coords align={vertical},
x tick label style={rotate=45,anchor=east},
]
\addplot coordinates { (excellent,0) (good,7) (neutral,3) (not good,0) (poor,0)};
\end{axis}
\end{tikzpicture}
\end{document}
|