Kaynağa Gözat

Add uncertainty to time graph

tags/0.5.1-reflection
Wouter Horlings 4 yıl önce
ebeveyn
işleme
b9263bcb82
1 değiştirilmiş dosya ile 17 ekleme ve 4 silme
  1. +17
    -4
      graphics/time_table.tex

+ 17
- 4
graphics/time_table.tex Dosyayı Görüntüle

@@ -1,13 +1,15 @@
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\usepackage{siltex}
\usetikzlibrary{arrows.meta,positioning}
\usetikzlibrary{arrows.meta,positioning,calc,fadings}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}
\pgfmathsetlengthmacro{\xbarvalue}{-3mm}
\pgfmathsetlengthmacro{\barwidthvalue}{4mm}
\begin{axis}[
xbar=-3mm,
bar width=4mm,
xbar=\xbarvalue,
bar width=\barwidthvalue,
xmin=0,
xmax=21,
width=85mm,
@@ -21,7 +23,18 @@
]
\addplot[draw=red,fill=red!40] coordinates {(2,Problem Description) (3,Specifications) (3.5,Initial Design) (13,Feature Definition) (0.5,Test Protocol) (3,Development Cycle 1) (17,Development Cycle 2) (20,Software Development)};
\addplot[draw=blue,fill=blue!40] coordinates {(2,Problem Description) (3,Specifications) (5,Initial Design) (6,Feature Definition) (1,Test Protocol) (3,Development Cycle 1) (13,Development Cycle 2)};
\legend{Time Spend,Time Planned};
\legend{Time Spend,Time Planned};
\pgfmathsetlengthmacro{\baroffset}{\barwidthvalue+\xbarvalue/2}
\pgfmathsetlengthmacro{\smeer}{7mm}
\node (a) at ($(axis cs:3,Development Cycle 1)-(0.1mm,0mm)+(0mm,\baroffset)$) {};
\node (b) at ($(axis cs:3,Development Cycle 1)-(0.1mm,0mm)-(0mm,\baroffset)$) {};
\fill[white] (a) rectangle ++(\smeer,-\barwidthvalue-1mm);
\fill[red!40,path fading=east] (b) rectangle ++(\smeer,1mm);
\fill[blue!40,path fading=east] (a) rectangle ++(\smeer,-\barwidthvalue);
\draw[white] ($(a)$) -- +(\smeer,0mm) ++(0mm,-\barwidthvalue) -- +(\smeer,0mm);
\draw[white] ($(b)$) -- +(\smeer,0mm);
\draw[blue,path fading=east] ($(a)$) -- +(\smeer,0mm) ++(0mm,-\barwidthvalue) -- +(\smeer,0mm);
\draw[red,path fading=east] ($(b)$) -- +(\smeer,0mm);
\end{axis}
\end{tikzpicture}
\end{document}

Yükleniyor…
İptal
Kaydet