1
0
Fork 0

Updated tasktime plot to show overlap

master
Mike Gerwitz 2013-08-29 13:03:27 -04:00
parent 7961b959e3
commit cb1da38001
2 changed files with 39 additions and 6 deletions

View File

@ -1,9 +1,13 @@
set terminal png size 1024,768
set key above horizontal autotitle columnheader
set bars 5.0
set style fill solid border -1
set xlabel "Date"
set ylabel "Man Hours"
set ylabel "Hours"
set grid y
set xrange [*:1]
set xtics rotate by -45
plot "tasktime.dat" using 1:3:4:3:4:xtic(2) title 'Time Interval' with candlesticks, \
"tasktime.dat" using 1:5 title 'Mean' with lines
plot "tasktime.dat" using 1:3:6:7:4:xtic(2) title 'Man Time Interval' \
with candlesticks whiskerbars 0.5 lc rgb "#ee5555", \
"tasktime.dat" using 1:8 title 'Overlap Mean' with lines lc rgb "green", \
"tasktime.dat" using 1:5 title 'Man-Hour Mean' with lines lc rgb "black"

View File

@ -1,6 +1,7 @@
% Task environment
\RequirePackage[usenames,dvipsnames]{xcolor}
\RequirePackage{etex}
\newcommand\taskname{Requisite}
@ -19,6 +20,10 @@
\newcounter{taskamin}
\newcounter{taskamax}
% all-encompassing overlap interval
\newcounter{taskaomin}
\newcounter{taskaomax}
\newcounter{subtaskc}[taskc]
\setcounter{subtaskc}{0}
\renewcommand\thesubtaskc{%
@ -81,6 +86,9 @@
{%
\def\@@h{#1}%
\goodbreak\leavevmode\@margin@sig
% enable overlap command
\let\overlap\@task@overlap
% typeset
\llap{%
\raisebox{-1.8\baselineskip}[0em][0em]{%
\shortstack{%
@ -118,6 +126,15 @@
\fi
}
\def\@task@overlap#1{%
\def\@@hoverlap{#1}%
\@task@setregs#1||%
\addtocounter{taskaomin}{\@@hmin}%
\addtocounter{taskaomax}{\@@hmax}%
}
\def\@task@setregs#1-#2||{%
\@@hmin#1\relax
\@@hmax#2\relax
@ -185,18 +202,30 @@
\advance\@@med \value{taskamin}%
\advance\@@med \value{taskamax}%
\divide\@@med by 2\relax
% calculate non-overlap
\newcount\@@nomin \newcount\@@nomax
\advance\@@nomin \value{taskamin}%
\advance\@@nomax \value{taskamax}%
\advance\@@nomin -\value{taskaomin}%
\advance\@@nomax -\value{taskaomax}%
% calculate overlap median
\newcount\@@omed
\advance\@@omed\@@nomin
\advance\@@omed\@@nomax
\divide\@@omed by 2\relax
% write task stats to file (can be used for reporting by building consecutive
% versions, concatenating the data, taking the last row for each date and
% plotting, for example)
\immediate\openout\@taskstats=taskstats.dat
\immediate\write\@taskstats{min max med cp vp}%
\immediate\write\@taskstats{min max med omin omax omed cp vp}%
\immediate\write\@taskstats{%
\arabic{taskamin} \arabic{taskamax} \the\@@med
\space\the\@@nomin \space \the\@@nomax \space\the\@@omed
\space\the\@@hconf \space\the\@@hvari
}%
\immediate\closeout\@taskstats
% reset counters
\setcounter{taskamin}{0}%
\setcounter{taskamax}{0}%
\setcounter{taskamin}{0}\setcounter{taskamax}{0}%
\setcounter{taskaomin}{0}\setcounter{taskaomax}{0}%
\pnumrest
}}