diff --git a/analysis/res/java/me/hex539/analysis/activity.tex.twig b/analysis/res/java/me/hex539/analysis/activity.tex.twig index e74f295..a7a6deb 100644 --- a/analysis/res/java/me/hex539/analysis/activity.tex.twig +++ b/analysis/res/java/me/hex539/analysis/activity.tex.twig @@ -4,6 +4,11 @@ \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{patterns} +\providecolor{Accepted}{named}{LimeGreen} +\providecolor{WrongAnswer}{named}{Red} +\providecolor{TimeLimit}{named}{Plum} +\providecolor{RunError}{named}{Goldenrod} +\providecolor{Pending}{named}{SkyBlue} \pgfplotsset{compat=1.15} \begin{document} \pgfplotstableread{ @@ -15,24 +20,39 @@ endfor %} }\attempts \pgfplotsset{ - /pgfplots/bar cycle list/.style={/pgfplots/cycle list= - { {Green,fill=LimeGreen},% Accepted - {Red,fill=Red},% Wrong-Answer - {Plum,fill=Plum},% Time-Limit - {Goldenrod,fill=Goldenrod},% Compile-Error / Runtime-Error - {SkyBlue,fill=SkyBlue},% Pending 1 - {SkyBlue,fill=SkyBlue},% Pending 2 - {White,fill=White,opacity=0}}% Prevent clipping - } + /pgfplots/bar cycle list/.style={/pgfplots/cycle list= + { {Accepted,fill=Accepted}, + {WrongAnswer,fill=WrongAnswer}, + {TimeLimit,fill=TimeLimit}, + {RunError,fill=RunError}, + {Pending,fill=Pending}, + {White,fill=White,opacity=0}}% = Prevent clipping + } }% +\makeatletter \newcommand{\pgfplotsdrawaxis}{\pgfplots@draw@axis} \makeatother +\pgfplotsset{axis line on top/.style={ + axis line style=transparent, + ticklabel style=transparent, + tick style=transparent, + axis on top=false, + after end axis/.append code={ + \pgfplotsset{axis line style=opaque, + ticklabel style=opaque, + tick style=opaque, + grid=none} + \pgfplotsdrawaxis} + } +} \begin{tikzpicture} \begin{axis}[ - % axis lines=none, axis x line=center, axis y line=none, + axis line style={-}, + axis line on top, clip=false, xmin=0, xmax={{ (accepted|length) }}, + ymin=0, width={{ 20 }}cm, bar width={{ 15.0 / (accepted|length) }}cm, height=5cm, @@ -43,9 +63,8 @@ endfor \addplot table[x=t,y expr={-\thisrow{wronganswer}}] {\attempts}; \addplot table[x=t,y expr={-\thisrow{timelimit}}] {\attempts}; \addplot table[x=t,y expr={-\thisrow{failed}}] {\attempts}; - \addplot table[x=t,y expr={+\thisrow{pending}*1}] {\attempts}; - \addplot table[x=t,y expr={-\thisrow{pending}*0}] {\attempts}; - \addplot table[x=t,y expr={-5}] {\attempts}; + \addplot table[x=t,y expr={+\thisrow{pending}}] {\attempts}; + \addplot table[x=t,y expr={-4}] {\attempts}; \end{axis} \end{tikzpicture} \end{document} diff --git a/analysis/res/java/me/hex539/analysis/language_stats.tex.twig b/analysis/res/java/me/hex539/analysis/language_stats.tex.twig index be7141c..f621bf3 100644 --- a/analysis/res/java/me/hex539/analysis/language_stats.tex.twig +++ b/analysis/res/java/me/hex539/analysis/language_stats.tex.twig @@ -4,6 +4,11 @@ \usepackage{pgfplots} \usepackage{pgfplotstable} \usetikzlibrary{patterns} +\providecolor{Accepted}{named}{LimeGreen} +\providecolor{WrongAnswer}{named}{Red} +\providecolor{TimeLimit}{named}{Plum} +\providecolor{RunError}{named}{Goldenrod} +\providecolor{Pending}{named}{SkyBlue} \pgfplotsset{compat=1.14} \begin{document} \pgfplotstableread{ @@ -25,11 +30,11 @@ endfor }\attempts \pgfplotsset{ /pgfplots/bar cycle list/.style={/pgfplots/cycle list= - { {draw=none,fill=LimeGreen},% Accepted - {draw=none,fill=Red},% Wrong-Answer - {draw=none,fill=Plum},% Time-Limit - {draw=none,fill=Goldenrod},% Compile-Error / Runtime-Error - {draw=none,fill=SkyBlue} % Pending + { {draw=none,fill=Accepted}, + {draw=none,fill=WrongAnswer}, + {draw=none,fill=TimeLimit}, + {draw=none,fill=RunError}, + {draw=none,fill=Pending} } }, /pgfplots/ybar legend/.style={