Commit c4978b2c by Kai Westerkamp

boxplot

parent 61dad44a
Pipeline #317 passed with stage
in 32 seconds
...@@ -10,52 +10,62 @@ ...@@ -10,52 +10,62 @@
Rot grün schwäche (genauen Namen erfragen) Rot grün schwäche (genauen Namen erfragen)
ha keine Probleme gemacht, Farbbend der Steine war kräftig genug 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} \begin{tikzpicture}
\pgfplotstableread{Charts/Erfahrung.txt}
\datatable
\begin{axis}[ \begin{axis}[
width = \textwidth, width = \textwidth,
height = 10cm, height = 10cm,
boxplot/draw direction=y, 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={ \addplot+[boxplot prepared from table={
table=\datatable, table=\datatable,
row=1, row=0,
lower whisker=Minimum, lower whisker=Minimum,
upper whisker=Maximum, upper whisker=Maximum,
lower quartile=Q1, lower quartile=Q1,
upper quartile=Q3, upper quartile=Q3,
median=Median median=Median,
}, color=blue average=Mittelwert
},boxplot prepared , color=blue
] ]
coordinates {}; coordinates {};
\addplot+[boxplot prepared from table={ \addplot+[boxplot prepared from table={
table=\datatable, table=\datatable,
row=2, row=1,
lower whisker=Minimum, lower whisker=Minimum,
upper whisker=Maximum, upper whisker=Maximum,
lower quartile=Q1, lower quartile=Q1,
upper quartile=Q3, upper quartile=Q3,
median=Median median=Median,
}, color=blue average=Mittelwert
},boxplot prepared , color=red
] ]
coordinates {}; coordinates {};
\end{axis} \end{axis}
\end{tikzpicture} \end{tikzpicture}
\end{figure}
......
Minimum Maximum Mittelwert Median Q1 Q3 Labels Minimum Maximum Mittelwert Median Q1 Q3
-3 2 0.090909091 1 -1.75 1 VR -3 2 0.090909091 1 -1.75 1
-3 2 -2.090909091 -3 -3 -1 AR -3 2 -2.090909091 -3 -3 -1
-3 3 1.590909091 2 1 3
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
\definecolor{delim}{RGB}{20,105,176} \definecolor{delim}{RGB}{20,105,176}
\colorlet{numb}{magenta!60!black} \colorlet{numb}{magenta!60!black}
%https://tex.stackexchange.com/questions/117435/read-boxplot-prepared-values-from-a-table
\pgfplotsset{ \pgfplotsset{
boxplot prepared from table/.code={ boxplot prepared from table/.code={
\def\tikz@plot@handler{\pgfplotsplothandlerboxplotprepared}% \def\tikz@plot@handler{\pgfplotsplothandlerboxplotprepared}%
...@@ -171,7 +171,8 @@ ...@@ -171,7 +171,8 @@
make style readable from table=upper quartile, make style readable from table=upper quartile,
make style readable from table=median, make style readable from table=median,
make style readable from table=lower notch, 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