Commit c4978b2c by Kai Westerkamp

boxplot

parent 61dad44a
......@@ -10,52 +10,62 @@
Rot grün schwäche (genauen Namen erfragen)
ha keine Probleme gemacht, Farbbend der Steine war kräftig genug
\begin{figure}
\caption{Erfahrung mit VR und AR, Median ist 1 und -1,Whisker sind Min und Max, Raute ist der Durchschnitt}
\label{plot:Erfahrung}
\begin{tikzpicture}
\pgfplotstableread{Charts/Erfahrung.txt}
\datatable
\begin{axis}[
width = \textwidth,
height = 10cm,
boxplot/draw direction=y,
axis x line*=bottom,
axis y line=left,
enlarge y limits,
ymajorgrids,
ymin=-3,
ymax=3,
%xtick=data,% crucial line for the xticklabels directive
xtick={1,2},
xticklabels from table={\datatable}{Labels},
x tick label style={font=\footnotesize, text width=2.5cm, align=center},
boxplot/draw direction=y
]
%\pgfplotstableread{Charts/Erfahrung.txt}
%\datatable
\pgfplotstableread{
Minimum Maximum Mittelwert Median Q1 Q3
-3 2 0.090909091 1 -1.75 1
-3 2 -2.090909091 -3 -3 -1
-3 3 1.590909091 2 1 3
}\datatable
\addplot+[boxplot prepared from table={
table=\datatable,
row=1,
row=0,
lower whisker=Minimum,
upper whisker=Maximum,
lower quartile=Q1,
upper quartile=Q3,
median=Median
}, color=blue
median=Median,
average=Mittelwert
},boxplot prepared , color=blue
]
coordinates {};
\addplot+[boxplot prepared from table={
table=\datatable,
row=2,
row=1,
lower whisker=Minimum,
upper whisker=Maximum,
lower quartile=Q1,
upper quartile=Q3,
median=Median
}, color=blue
median=Median,
average=Mittelwert
},boxplot prepared , color=red
]
coordinates {};
\end{axis}
\end{tikzpicture}
\end{figure}
......
Minimum Maximum Mittelwert Median Q1 Q3
-3 2 0.090909091 1 -1.75 1
-3 2 -2.090909091 -3 -3 -1
-3 3 1.590909091 2 1 3
Labels Minimum Maximum Mittelwert Median Q1 Q3
VR -3 2 0.090909091 1 -1.75 1
AR -3 2 -2.090909091 -3 -3 -1
......@@ -147,7 +147,7 @@
\definecolor{delim}{RGB}{20,105,176}
\colorlet{numb}{magenta!60!black}
%https://tex.stackexchange.com/questions/117435/read-boxplot-prepared-values-from-a-table
\pgfplotsset{
boxplot prepared from table/.code={
\def\tikz@plot@handler{\pgfplotsplothandlerboxplotprepared}%
......@@ -171,7 +171,8 @@
make style readable from table=upper quartile,
make style readable from table=median,
make style readable from table=lower notch,
make style readable from table=upper notch
make style readable from table=upper notch,
make style readable from table=average
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment