2

I need to create a flowchart which looks like the Image I left atacched.I tried these codes but the outcome is not even close to what I want. thank you in advance.

\tikzstyle{process} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!30]
\tikzstyle{arrow} = [thick,->,>=stealth]
\tikzstyle{input} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=blue!10]

\begin{tikzpicture}[node distance=2cm]

\node (design) [process] {Design \\ (e.g., microprocessor design)};
\node (fabrication) [process, right of=design, xshift=4cm] {Fabrication \\ (e.g., processed wafers)};
\node (assembly) [process, right of=fabrication, xshift=4cm] {Assembly \& Test \\ (e.g., packaged microprocessor units)};

\node (designsw) [input, below of=design, yshift=-2cm] {Design Software \\ (e.g., electronic design automation)};
\node (intellectual) [input, below of=designsw, yshift=-1cm] {Intellectual Property \\ (e.g., licensed ARM architecture)};
\node (materials) [input, below of=fabrication, yshift=-2cm] {Materials \& Chemicals \\ (e.g., raw silicon wafers, neon)};
\node (equipment) [input, below of=materials, yshift=-1cm] {Manufacturing Equipment \\ (e.g., lithography tools)};

\draw [arrow] (design) -- (fabrication);
\draw [arrow] (fabrication) -- (assembly);

\draw [arrow] (designsw) -- (design);
\draw [arrow] (intellectual) -- (design);
\draw [arrow] (materials) -- (fabrication);
\draw [arrow] (equipment) -- (fabrication);

\end{tikzpicture}

enter image description here

1
  • Welcome! Can you complete your code snippet so we can copy-paste-compile it? And note that \tikzstyle is deprecated and should be replaced by \tikzset.
    – cfr
    Commented Jun 21 at 16:48

2 Answers 2

3

This fixes most of the problems.

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{calc}
\begin{document}

\tikzset{process/.style={rectangle, rounded corners, text width=4cm, minimum height=1cm, align=center, draw=black, fill=blue!30}}
\tikzset{arrow/.style={thick,->,>=stealth}}
\tikzset{input/.style={rectangle, text width=1.75cm, minimum height=1cm, align=center, draw=black, fill=blue!10, font=\footnotesize}}

\begin{tikzpicture}

\node (design) [process] {Design \\ (e.g., microprocessor design)};
\node (fabrication) [process, right=1cm] at(design.east) {Fabrication \\ (e.g., processed wafers)};
\node (assembly) [process, right=1cm] at(fabrication.east) {Assembly \& Test \\ (e.g., packaged microprocessor units)};

\coordinate (designA) at ($(design.south west) !0.5! (design.south)$);
\coordinate (designB) at ($(design.south) !0.5! (design.south east)$);
\coordinate (fabricationA) at ($(fabrication.south west) !0.5! (fabrication.south)$);
\coordinate (fabricationB) at ($(fabrication.south) !0.5! (fabrication.south east)$);
\coordinate (assemblyA) at ($(assembly.south west) !0.5! (assembly.south)$);
\coordinate (assemblyB) at ($(assembly.south) !0.5! (assembly.south east)$);

\node (designsw) [input, below=1cm] at(designA) {Design Software \\ (e.g., electronic design automation)};
\node (intellectual) [input, below=1cm] at(designB) {Intellectual Property \\ (e.g., licensed ARM architecture)};
\node (materials) [input, below=1cm] at(fabricationA) {Materials \& Chemicals \\ (e.g., raw silicon wafers, neon)};
\node (equipment) [input, below=1cm] at(fabricationB) {Manufacturing Equipment \\ (e.g., lithography tools)};

\draw [arrow] (design) -- (fabrication);
\draw [arrow] (fabrication) -- (assembly);

\draw [arrow] (designsw) -- (designA);
\draw [arrow] (intellectual) -- (designB);
\draw [arrow] (materials) -- (fabricationA);
\draw [arrow] (equipment) -- (fabricationB);

\end{tikzpicture}
\end{document}

demo

3
  • Can you update the \tikzstyle syntax?
    – cfr
    Commented Jun 21 at 17:22
  • Can, but won't. (just kidding) Commented Jun 21 at 19:12
  • s/update the \\tikzstyle syntax/upvote/ ;).
    – cfr
    Commented Jun 21 at 19:19
2

I don't know if you want the colours you show or the colours you've coded. On the grounds that you know how to code the ones you've coded, the following codes the ones you've shown instead.

The positioning library makes positioning the nodes relative to one another much easier, though the syntax is a little different. I've also used anchors to fine-tune the positioning where necessary. You need to set text width for text centered to be effective and to increase minimum height to get same-height nodes.

The following defines two new styles: common holds settings common to all the rectangular nodes. process and input then use this style. no defines a style for the circled numbers.

I've also used arrows.meta as the stealth tip is deprecated and updated from \tikzstyle, which is also deprecated syntax.

flowchart

\documentclass[border=5pt]{standalone}
\usepackage{tikz}
% ateb: https://tex.stackexchange.com/a/721068/ addaswyd o gwestiwn Yusef Hamdellah: https://tex.stackexchange.com/q/721061/
\usetikzlibrary{positioning,arrows.meta}
\newcommand \bhead[1]{\textcolor{blue!50!gray}{\textbf{#1}}}
\begin{document}
\tikzset{%
  common/.style={text centered,draw=black,font=\sffamily,thick},
  process/.style={rounded corners, text width=5cm, minimum height=2cm, common, draw=blue!50!gray},
  arrow/.style={ultra thick,blue!50!gray,shorten >=2.5mm,shorten <=2.5mm,-Triangle},
  input/.style={text width=2.25cm, minimum height=2.5cm, common,draw=blue!50!gray},
  no/.style={circle,fill=blue!50!gray,text=white,font=\sffamily,minimum size=2.5mm,anchor=center},
}

\begin{tikzpicture}[node distance=2cm]
  
  \node (design) [process] {Design\\(e.g., microprocessor design)};
  \node (fabrication) [process, right=of design] {\bhead{Fabrication}\\(e.g., processed wafers)};
  \node (assembly) [process, right=of fabrication] {\bhead{Assembly \& Test}\\(e.g., packaged microprocessor units)};
  
  \node (designsw) [input, below=of design.south west,anchor=north west] {\bhead{Design Software}\\(e.g., electronic design automation)};
  \node (intellectual) [input, below=of design.south east,anchor=north east] {\bhead{Intellectual Property}\\(e.g., licensed ARM architecture)};
  \node (materials) [input, below=of fabrication.south west,anchor=north west] {\bhead{Materials \& Chemicals}\\(e.g., raw silicon wafers, neon)};
  \node (equipment) [input, below=of fabrication.south east,anchor=north east] {\bhead{Manufacturing Equipment}\\(e.g.,\\lithography tools)};
  
  \draw [arrow] (design) -- (fabrication);
  \draw [arrow] (fabrication) -- (assembly);
  
  \draw [arrow] (designsw) -- (design.south -| designsw);
  \draw [arrow] (intellectual) -- (design.south -| intellectual);
  \draw [arrow] (materials) -- (fabrication.south -| materials);
  \draw [arrow] (equipment) -- (fabrication.south -| equipment);
  
  \foreach \i [count=\j] in {design,fabrication,assembly}
  {
    \node [no] at (\i.north west) {\j};
  }
  
\end{tikzpicture}
\end{document}
2
  • I tried to use to your lines of code but the problem is that the flowchart does not fit into the page. Probably because I set specific margins in my document. Maybe if I send you the link of my project you could directly fix the problem. About the colour, I would like to have a sky blue if it's possible. Thank you in adveance. it.overleaf.com/8912192948rqmmdshmgfhw#660953 Commented Jun 29 at 0:26
  • @YusefHamdellah Unfortunately that's not really how the site works. If you want to provide further information, please edit your question here. For example, make your code into something we can compile with the same paper size and margins you use in your document. The font and font size should also match if you're not using the defaults.
    – cfr
    Commented Jun 29 at 1:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .