1

On one of Beamer slides for my dissertation defense I construct a TikZ diagram, representing my research software's workflow. It works fine with one exception: there is a "defect" on the east side of the "ready4EDA" block (extra arrow end tip + wrong arrow start tip). It seems strange to me and, based on the similarity of code for other block definitions, I even suspect that it might be a software defect (not very likely) or conflict between LaTeX or TikZ packages. I would appreciate comments and, preferably, solutions on getting rid of that "defect". The MWE follows.

enter image description here

Notes: 1) I would like to stay with this (standard TikZ) implementation; 2) I use smartdiagram package for some other diagrams in my presentation.

\documentclass[12pt]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{mindmap, trees, shadows, shapes, backgrounds, calc, fadings, positioning, decorations.pathreplacing, intersections, fit}
\usepackage{smartdiagram}

\usepackage{palatino}

\usetheme{Boadilla}
\usecolortheme{orchid}
\useinnertheme{rectangles}
\beamertemplateshadingbackground{gray!5}{gray!20}
\setbeamertemplate{navigation symbols}{}


\newcommand{\DISSflossWorkflow}{

  \begin{tikzpicture}[node distance=8cm, auto, >=stealth]

  \tikzstyle{block}= [rectangle, ultra thick, rounded corners, draw=blue, fill=blue!20, minimum height=1.25cm, minimum width=32mm, align=center, inner sep=0.5em]
  \tikzstyle{arrow}= [ultra thick, ->, >=stealth]

  \node[block] (dataHeader) {\color{red}\textbf{Data}};
  \node[block] (softHeader) [right of = dataHeader, node distance = 4cm] {\color{red}\textbf{Software}};
  %\draw[->] (a) -- (b);
  \node[block] (artiHeader) [right of = softHeader, node distance = 4cm] {\color{red}\textbf{Artifacts}};
  %\draw[->] (b) -- (c);
  % \draw[-] (\xcoord[west]{dataHeader}, \ycoord[south]{dataHeader} - 1) -- (\xcoord[east]{artiHeader}, \ycoord[south]{dataHeader} - 1);
  \node[block] (dataSources) [below of = dataHeader, node distance = 1.5cm]{Data Sources};
  \node[block] (softImport) [right of = dataSources, node distance = 4cm] {import};
  \draw[arrow] (dataSources) -- (softImport);

  \node[block] (dataCache) [below of = dataSources, node distance = 1.5cm] {cache};
  \draw[arrow] (softImport) -- (dataCache);

  \node[block] (softPrepare) [right of = dataCache, node distance = 4cm] {prepare};
  \draw[arrow] (dataCache) -- (softPrepare);

  \node[block] (dataTransform) [below of = dataCache, node distance = 1.5cm] {transform};
  \draw[arrow] (softPrepare) -- (dataTransform);

  \node[block] (dataReady4EDA) [below of = dataCache, node distance = 1.5cm] {ready4EDA};
  \draw[arrow] (dataTransform) -- (dataReady4EDA);

  \node[block] (softEDA) [right of = dataReady4EDA, node distance = 4cm] {EDA};
  \draw[arrow] (dataReady4EDA) -- (softEDA);

  \node[block] (artiEDA) [right of = softEDA, node distance = 4cm] {EDA Report};
  \draw[arrow] (softEDA) -- (artiEDA);

  \node[block] (dataReady4EFA) [below of = dataReady4EDA, node distance = 1.5cm] {ready4EFA};
  \draw[arrow] (softEDA) -- (dataReady4EFA);

  \node[block] (softEFA) [right of = dataReady4EFA, node distance = 4cm] {EFA};
  \draw[arrow] (dataReady4EFA) -- (softEFA);

  \node[block] (artiEFA) [right of = softEFA, node distance = 4cm] {EFA Report};
  \draw[arrow] (softEFA) -- (artiEFA);

  \node[block] (dataReady4CFA) [below of = dataReady4EFA, node distance = 1.5cm] {ready4CFA};
  \draw[arrow] (softEFA) -- (dataReady4CFA);

  \node[block] (softCFA) [right of = dataReady4CFA, node distance = 4cm] {CFA};
  \draw[arrow] (dataReady4CFA) -- (softCFA);

  \node[block] (artiCFA) [right of = softCFA, node distance = 4cm] {CFA Report};
  \draw[arrow] (softCFA) -- (artiCFA);

  \node[block] (dataReady4SEM) [below of = dataReady4CFA, node distance = 1.5cm] {ready4SEM};
  \draw[arrow] (softCFA) -- (dataReady4SEM);

  \node[block] (softSEM) [right of = dataReady4SEM, node distance = 4cm] {SEM};
  \draw[arrow] (dataReady4SEM) -- (softSEM);

  \node[block] (artiSEM) [right of = softSEM, node distance = 4cm] {SEM Report};
  \draw[arrow] (softSEM) -- (artiSEM);

  \end{tikzpicture}
}


\begin{document}

\begin{frame}{Research Software: Workflow}

\centering
\scalebox{0.7}{\DISSflossWorkflow}

\end{frame}

\end{document}
2
  • 3
    Did you try cutting this down to an MWE yourself? dataReady4EDA and dataTransform are both positioned identically (below of=dataCache) so when you try \draw[arrow] (dataTransform) -- (dataReady4EDA); you get this spurious arrow going nowhere. Mar 29 '15 at 21:15
  • @PaulGessler: Good catch! Thank you so much - I guess, I initially planned a bit more expanded diagram, hence dataTransform block definition, but later decided against it (probably due to size constraints and the fact that data transformation is part of prepare anyway). I've already updated corresponding code and it fixed the issue. If you'll convert you comment into an answer, I will be happy to upvote and accept it. Mar 29 '15 at 21:30
4

Converting my comment into an answer:

The nodes dataReady4EDA and dataTransform are both positioned identically (below of=dataCache) so when you try

\draw[arrow] (dataTransform) -- (dataReady4EDA); 

you get this spurious arrow going nowhere. You can comment that line (or reposition your nodes) to correct the problem.


Other notes:

  1. You might consider using TikZ's scale option or font=\small, etc. instead of the \scalebox, then the font sizes used will be consistent with other design choices in the presentation rather than some arbitrary size.

  2. For new documents, prefer the new \tikzset{<name>/.style={<style-defn>}} over the old \tikzstyle method. (See Should \tikzset or \tikzstyle be used to define TikZ styles?)

  3. You load the new positioning library but use the older syntax right of = <node> rather than the positioning library syntax right=of <node>.

1
  • 2
    Thank you again! Your notes on code improvement are appreciated as well. Mar 29 '15 at 21:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.