How to draw a diagram like this with tikz?Rotate a node but not its content: the case of the ellipse decorationHow to evenly space out nodes or in tikz?How to define the default vertical distance between nodes?Add text on arrow in flowchartInput/Output Nodes - Specification and Description LanguageTikz: Lining up input and output nodes in multiple input multiple output diagramText alignment and form of connectors (edges) in tikz treeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themThe order of execution of options (draw & font), pgfextra, and a node along a TikZ path

How to track mail undetectably?

Grid: different background color (of row) based on values

Would skyscrapers tip over if people fell sideways?

Can I take Amul cottage cheese from India to Netherlands?

Journal standards vs. personal standards

What are the children of two Muggle-borns called?

What was the first science fiction or fantasy multiple choice book?

Tricolour nonogram

Is it possible to alias a column based on the result of a select+where?

Why should I allow multiple IPs on a website for a single session?

Dynamic Sql Query - how to add an int to the code?

Do electrons really perform instantaneous quantum leaps?

I agreed to cancel a long-planned vacation (with travel costs) due to project deadlines, but now the timeline has all changed again

What prevents a US state from colonizing a smaller state?

Did the Russian Empire have a claim to Sweden? Was there ever a time where they could have pursued it?

German idiomatic equivalents of 能骗就骗 (if you can cheat, then cheat)

How did they film the Invisible Man being invisible in 1933?

Active wildlife outside the window- Good or Bad for Cat psychology?

Why is my 401k manager recommending me to save more?

Robots in a spaceship

Subset of knight's move in chess.

What overwrites /etc/resolv.conf roughly every hour?

Installed software from source, how to say yum not to install it from package?

Avoiding repetition when using the "snprintf idiom" to write text



How to draw a diagram like this with tikz?


Rotate a node but not its content: the case of the ellipse decorationHow to evenly space out nodes or in tikz?How to define the default vertical distance between nodes?Add text on arrow in flowchartInput/Output Nodes - Specification and Description LanguageTikz: Lining up input and output nodes in multiple input multiple output diagramText alignment and form of connectors (edges) in tikz treeDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themThe order of execution of options (draw & font), pgfextra, and a node along a TikZ path













1















I know this is a shit question, but I don't know what to do because I don't have much time left.



I need a diagram like this for my thesis:
diagram example



I already tried making this with tikz. First I tried it with the libraries shapes and arrows on my own with node and path, but I couldn't do it.
Then I tried it with the trees library, but it also didn't work out how I wanted.
Now I need you help. I guess it's just a few lines of code.



Here is the code of my best attempt so far



documentclass[a4,border=10pt]article
usepackagetikz
usetikzlibraryshapes,arrows

begindocument
% Define block styles
tikzstyledecision = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
tikzstyleblock = [rectangle, draw, fill=blue!20,
text width=5em, text centered, minimum height=4em]
tikzstyleline = [draw, -latex']

begintikzpicture[node distance = 2cm, auto]
% Place nodes
node [decision] (outsideThreat) Bedrohung von außen?;
node [block, left of=outsideThreat, below of=outsideThreat] (firewall) Firewall;
node [decision, right of=outsideThreat, below of=outsideThreat] (knownThreat) Bedrohung bekannt?;
node [block, below of=knownThreat, left of=knownThreat] (idsAds) IDS/ADS;
node [block, below of=knownThreat, right of=knownThreat] (honeypots) Honeypots;
% Draw edges
path [line] (outsideThreat) --(outsideThreat-|firewall) -- node yes (firewall);
path [line] (outsideThreat) --(knownThreat|-outsideThreat) -- node no (knownThreat);
path [line] (firewall) -- (knownThreat);
path [line] (knownThreat) --(knownThreat-|idsAds) -- node yes (idsAds);
path [line] (knownThreat) --(honeypots|-knownThreat) -- node no (honeypots);
endtikzpicture
enddocument


This code produces this output:
enter image description here



I can't manage to get the Firewall block and the Bedrohung bekannt? decision on the same level horizontally. And don't know how to achieve the exact arrows of my example above.










share|improve this question









New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

    – Teepeemm
    8 hours ago











  • @Teepeemm Of course, will post it below as answer.

    – LaTeXNoob
    8 hours ago












  • Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

    – Teepeemm
    8 hours ago















1















I know this is a shit question, but I don't know what to do because I don't have much time left.



I need a diagram like this for my thesis:
diagram example



I already tried making this with tikz. First I tried it with the libraries shapes and arrows on my own with node and path, but I couldn't do it.
Then I tried it with the trees library, but it also didn't work out how I wanted.
Now I need you help. I guess it's just a few lines of code.



Here is the code of my best attempt so far



documentclass[a4,border=10pt]article
usepackagetikz
usetikzlibraryshapes,arrows

begindocument
% Define block styles
tikzstyledecision = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
tikzstyleblock = [rectangle, draw, fill=blue!20,
text width=5em, text centered, minimum height=4em]
tikzstyleline = [draw, -latex']

begintikzpicture[node distance = 2cm, auto]
% Place nodes
node [decision] (outsideThreat) Bedrohung von außen?;
node [block, left of=outsideThreat, below of=outsideThreat] (firewall) Firewall;
node [decision, right of=outsideThreat, below of=outsideThreat] (knownThreat) Bedrohung bekannt?;
node [block, below of=knownThreat, left of=knownThreat] (idsAds) IDS/ADS;
node [block, below of=knownThreat, right of=knownThreat] (honeypots) Honeypots;
% Draw edges
path [line] (outsideThreat) --(outsideThreat-|firewall) -- node yes (firewall);
path [line] (outsideThreat) --(knownThreat|-outsideThreat) -- node no (knownThreat);
path [line] (firewall) -- (knownThreat);
path [line] (knownThreat) --(knownThreat-|idsAds) -- node yes (idsAds);
path [line] (knownThreat) --(honeypots|-knownThreat) -- node no (honeypots);
endtikzpicture
enddocument


This code produces this output:
enter image description here



I can't manage to get the Firewall block and the Bedrohung bekannt? decision on the same level horizontally. And don't know how to achieve the exact arrows of my example above.










share|improve this question









New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

    – Teepeemm
    8 hours ago











  • @Teepeemm Of course, will post it below as answer.

    – LaTeXNoob
    8 hours ago












  • Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

    – Teepeemm
    8 hours ago













1












1








1


0






I know this is a shit question, but I don't know what to do because I don't have much time left.



I need a diagram like this for my thesis:
diagram example



I already tried making this with tikz. First I tried it with the libraries shapes and arrows on my own with node and path, but I couldn't do it.
Then I tried it with the trees library, but it also didn't work out how I wanted.
Now I need you help. I guess it's just a few lines of code.



Here is the code of my best attempt so far



documentclass[a4,border=10pt]article
usepackagetikz
usetikzlibraryshapes,arrows

begindocument
% Define block styles
tikzstyledecision = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
tikzstyleblock = [rectangle, draw, fill=blue!20,
text width=5em, text centered, minimum height=4em]
tikzstyleline = [draw, -latex']

begintikzpicture[node distance = 2cm, auto]
% Place nodes
node [decision] (outsideThreat) Bedrohung von außen?;
node [block, left of=outsideThreat, below of=outsideThreat] (firewall) Firewall;
node [decision, right of=outsideThreat, below of=outsideThreat] (knownThreat) Bedrohung bekannt?;
node [block, below of=knownThreat, left of=knownThreat] (idsAds) IDS/ADS;
node [block, below of=knownThreat, right of=knownThreat] (honeypots) Honeypots;
% Draw edges
path [line] (outsideThreat) --(outsideThreat-|firewall) -- node yes (firewall);
path [line] (outsideThreat) --(knownThreat|-outsideThreat) -- node no (knownThreat);
path [line] (firewall) -- (knownThreat);
path [line] (knownThreat) --(knownThreat-|idsAds) -- node yes (idsAds);
path [line] (knownThreat) --(honeypots|-knownThreat) -- node no (honeypots);
endtikzpicture
enddocument


This code produces this output:
enter image description here



I can't manage to get the Firewall block and the Bedrohung bekannt? decision on the same level horizontally. And don't know how to achieve the exact arrows of my example above.










share|improve this question









New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I know this is a shit question, but I don't know what to do because I don't have much time left.



I need a diagram like this for my thesis:
diagram example



I already tried making this with tikz. First I tried it with the libraries shapes and arrows on my own with node and path, but I couldn't do it.
Then I tried it with the trees library, but it also didn't work out how I wanted.
Now I need you help. I guess it's just a few lines of code.



Here is the code of my best attempt so far



documentclass[a4,border=10pt]article
usepackagetikz
usetikzlibraryshapes,arrows

begindocument
% Define block styles
tikzstyledecision = [diamond, draw, fill=blue!20,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
tikzstyleblock = [rectangle, draw, fill=blue!20,
text width=5em, text centered, minimum height=4em]
tikzstyleline = [draw, -latex']

begintikzpicture[node distance = 2cm, auto]
% Place nodes
node [decision] (outsideThreat) Bedrohung von außen?;
node [block, left of=outsideThreat, below of=outsideThreat] (firewall) Firewall;
node [decision, right of=outsideThreat, below of=outsideThreat] (knownThreat) Bedrohung bekannt?;
node [block, below of=knownThreat, left of=knownThreat] (idsAds) IDS/ADS;
node [block, below of=knownThreat, right of=knownThreat] (honeypots) Honeypots;
% Draw edges
path [line] (outsideThreat) --(outsideThreat-|firewall) -- node yes (firewall);
path [line] (outsideThreat) --(knownThreat|-outsideThreat) -- node no (knownThreat);
path [line] (firewall) -- (knownThreat);
path [line] (knownThreat) --(knownThreat-|idsAds) -- node yes (idsAds);
path [line] (knownThreat) --(honeypots|-knownThreat) -- node no (honeypots);
endtikzpicture
enddocument


This code produces this output:
enter image description here



I can't manage to get the Firewall block and the Bedrohung bekannt? decision on the same level horizontally. And don't know how to achieve the exact arrows of my example above.







tikz-pgf tikz-trees






share|improve this question









New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 8 hours ago









Phelype Oleinik

30.7k7 gold badges52 silver badges105 bronze badges




30.7k7 gold badges52 silver badges105 bronze badges






New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









LaTeXNoobLaTeXNoob

61 bronze badge




61 bronze badge




New contributor



LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




LaTeXNoob is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.














  • Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

    – Teepeemm
    8 hours ago











  • @Teepeemm Of course, will post it below as answer.

    – LaTeXNoob
    8 hours ago












  • Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

    – Teepeemm
    8 hours ago

















  • Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

    – Teepeemm
    8 hours ago











  • @Teepeemm Of course, will post it below as answer.

    – LaTeXNoob
    8 hours ago












  • Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

    – Teepeemm
    8 hours ago
















Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

– Teepeemm
8 hours ago





Could you post the code of your best attempt? It may not quite work, but it would give us something to start from.

– Teepeemm
8 hours ago













@Teepeemm Of course, will post it below as answer.

– LaTeXNoob
8 hours ago






@Teepeemm Of course, will post it below as answer.

– LaTeXNoob
8 hours ago














Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

– Teepeemm
8 hours ago





Thanks for that (although it would have been better to edit this post and put the code here - we're somewhat strict about only answers going in the answer area).

– Teepeemm
8 hours ago










3 Answers
3






active

oldest

votes


















4














Here is one way!



documentclass[tikz,border=3mm]standalone
usetikzlibraryshapes.geometric
begindocument
begintikzpicture[thick,>=stealth]
tikzsetbox/.style=
draw,minimum height=1.2cm,minimum width=3cm
path
(0,2) node[diamond,draw] (d1) decision1
(-5,-2) node[box] (b1) block1
(4,-2) node[diamond,draw] (d2) decision2
++(-90:1.5) coordinate (d2s)
+(4,-2) node[box] (b3) block3
+(-3,-1.5) node[box] (b4) block4;
draw (0,0)--(d1);
draw[->] (0,0)-|(d2) node[pos=.25,above]no;
draw[->] (0,0)-|(b1) node[pos=.25,above]yes;
draw[->] (b1)--(d2) node[midway,above]some condition;
draw (d2)--(d2s);
draw[->] (d2s)-|(b3) node[pos=.25,above]no;
draw[->] (d2s)-|(b4) node[pos=.25,above]yes;
endtikzpicture
enddocument


enter image description here






share|improve this answer


















  • 1





    Good answer (+1). Can you align block4 and block3 horizontally?

    – ferahfeza
    8 hours ago











  • Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

    – LaTeXNoob
    8 hours ago











  • @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

    – Black Mild
    8 hours ago


















1














With forest you can automatize several things. In particular, you can leave the decision whether or not a node is a decision to forest.



documentclass[tikz,border=3.14mm]standalone
usepackage[edges]forest
usetikzlibraryshapes.geometric
begindocument
beginforest
forked edges,
for tree=l sep=3em,s sep=3em,edge=-stealth,
where n children=2diamondrectangle,inner sep=1ex,draw,
if n=1edge label=node [pos=0.25, below] yes edge label=node [pos=0.25, below] no
[decision 1
[block 1,alias=b1]
[decision 2,alias=d2
[block 2]
[block 3]
]
]
draw[-stealth] (b1) -- (d2) node[midway,above]pft;
endforest
enddocument


enter image description here






share|improve this answer






























    1














    For fun, a simple pstricks code:



    documentclass[border=6pt]standalone%
    usepackage[utf8]inputenc
    usepackage[T1]fontenc
    usepackagepst-node
    newcommandpsstrutrule[-0.55cm]0pt1.25cm
    newcommanddiastrutrule[-0.65cm]0pt1.45cm%

    begindocument

    sffamilyeverymathdisplaystyle%
    pssetframesep=1pt, arrows=->, arrowinset=0.1,linejoin=1
    beginpsmatrix[rowsep=2.5cm, colsep=2cm, emnode=r]%
    %%% Nodes
    & dianode[framesep = -2pt]d1diastrut Decision 1\
    [name=b1] psframeboxmakebox[2.5cm]psstrut block 1 & & dianode[framesep = -2pt]d2diastrut Decision 2\
    & [name=b2] psframeboxmakebox[2.5cm]psstrut block 2 & & [name=b3] psframeboxmakebox[2.5cm]psstrut block 3
    %%% Node connections
    pssetangleA=-90, angleB=90, armA=0.8cm, armB=0.8cm, labelsep=2pt
    ncanglesd1b1nbputyes
    ncanglesd1d2naputno
    nclineb1d2naputsome condition
    ncanglesd2b2nbputyes
    ncanglesd2b3naputno
    endpsmatrix

    enddocument


    enter image description here






    share|improve this answer

























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "85"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: false,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: null,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );






      LaTeXNoob is a new contributor. Be nice, and check out our Code of Conduct.









      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f497864%2fhow-to-draw-a-diagram-like-this-with-tikz%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      4














      Here is one way!



      documentclass[tikz,border=3mm]standalone
      usetikzlibraryshapes.geometric
      begindocument
      begintikzpicture[thick,>=stealth]
      tikzsetbox/.style=
      draw,minimum height=1.2cm,minimum width=3cm
      path
      (0,2) node[diamond,draw] (d1) decision1
      (-5,-2) node[box] (b1) block1
      (4,-2) node[diamond,draw] (d2) decision2
      ++(-90:1.5) coordinate (d2s)
      +(4,-2) node[box] (b3) block3
      +(-3,-1.5) node[box] (b4) block4;
      draw (0,0)--(d1);
      draw[->] (0,0)-|(d2) node[pos=.25,above]no;
      draw[->] (0,0)-|(b1) node[pos=.25,above]yes;
      draw[->] (b1)--(d2) node[midway,above]some condition;
      draw (d2)--(d2s);
      draw[->] (d2s)-|(b3) node[pos=.25,above]no;
      draw[->] (d2s)-|(b4) node[pos=.25,above]yes;
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer


















      • 1





        Good answer (+1). Can you align block4 and block3 horizontally?

        – ferahfeza
        8 hours ago











      • Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

        – LaTeXNoob
        8 hours ago











      • @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

        – Black Mild
        8 hours ago















      4














      Here is one way!



      documentclass[tikz,border=3mm]standalone
      usetikzlibraryshapes.geometric
      begindocument
      begintikzpicture[thick,>=stealth]
      tikzsetbox/.style=
      draw,minimum height=1.2cm,minimum width=3cm
      path
      (0,2) node[diamond,draw] (d1) decision1
      (-5,-2) node[box] (b1) block1
      (4,-2) node[diamond,draw] (d2) decision2
      ++(-90:1.5) coordinate (d2s)
      +(4,-2) node[box] (b3) block3
      +(-3,-1.5) node[box] (b4) block4;
      draw (0,0)--(d1);
      draw[->] (0,0)-|(d2) node[pos=.25,above]no;
      draw[->] (0,0)-|(b1) node[pos=.25,above]yes;
      draw[->] (b1)--(d2) node[midway,above]some condition;
      draw (d2)--(d2s);
      draw[->] (d2s)-|(b3) node[pos=.25,above]no;
      draw[->] (d2s)-|(b4) node[pos=.25,above]yes;
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer


















      • 1





        Good answer (+1). Can you align block4 and block3 horizontally?

        – ferahfeza
        8 hours ago











      • Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

        – LaTeXNoob
        8 hours ago











      • @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

        – Black Mild
        8 hours ago













      4












      4








      4







      Here is one way!



      documentclass[tikz,border=3mm]standalone
      usetikzlibraryshapes.geometric
      begindocument
      begintikzpicture[thick,>=stealth]
      tikzsetbox/.style=
      draw,minimum height=1.2cm,minimum width=3cm
      path
      (0,2) node[diamond,draw] (d1) decision1
      (-5,-2) node[box] (b1) block1
      (4,-2) node[diamond,draw] (d2) decision2
      ++(-90:1.5) coordinate (d2s)
      +(4,-2) node[box] (b3) block3
      +(-3,-1.5) node[box] (b4) block4;
      draw (0,0)--(d1);
      draw[->] (0,0)-|(d2) node[pos=.25,above]no;
      draw[->] (0,0)-|(b1) node[pos=.25,above]yes;
      draw[->] (b1)--(d2) node[midway,above]some condition;
      draw (d2)--(d2s);
      draw[->] (d2s)-|(b3) node[pos=.25,above]no;
      draw[->] (d2s)-|(b4) node[pos=.25,above]yes;
      endtikzpicture
      enddocument


      enter image description here






      share|improve this answer













      Here is one way!



      documentclass[tikz,border=3mm]standalone
      usetikzlibraryshapes.geometric
      begindocument
      begintikzpicture[thick,>=stealth]
      tikzsetbox/.style=
      draw,minimum height=1.2cm,minimum width=3cm
      path
      (0,2) node[diamond,draw] (d1) decision1
      (-5,-2) node[box] (b1) block1
      (4,-2) node[diamond,draw] (d2) decision2
      ++(-90:1.5) coordinate (d2s)
      +(4,-2) node[box] (b3) block3
      +(-3,-1.5) node[box] (b4) block4;
      draw (0,0)--(d1);
      draw[->] (0,0)-|(d2) node[pos=.25,above]no;
      draw[->] (0,0)-|(b1) node[pos=.25,above]yes;
      draw[->] (b1)--(d2) node[midway,above]some condition;
      draw (d2)--(d2s);
      draw[->] (d2s)-|(b3) node[pos=.25,above]no;
      draw[->] (d2s)-|(b4) node[pos=.25,above]yes;
      endtikzpicture
      enddocument


      enter image description here







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered 8 hours ago









      Black MildBlack Mild

      1,0087 silver badges12 bronze badges




      1,0087 silver badges12 bronze badges







      • 1





        Good answer (+1). Can you align block4 and block3 horizontally?

        – ferahfeza
        8 hours ago











      • Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

        – LaTeXNoob
        8 hours ago











      • @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

        – Black Mild
        8 hours ago












      • 1





        Good answer (+1). Can you align block4 and block3 horizontally?

        – ferahfeza
        8 hours ago











      • Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

        – LaTeXNoob
        8 hours ago











      • @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

        – Black Mild
        8 hours ago







      1




      1





      Good answer (+1). Can you align block4 and block3 horizontally?

      – ferahfeza
      8 hours ago





      Good answer (+1). Can you align block4 and block3 horizontally?

      – ferahfeza
      8 hours ago













      Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

      – LaTeXNoob
      8 hours ago





      Yes thank you for that answer. @ferahfeza to align block4 and just change the y coordinate of block4 to be 2 (the same as block 3)

      – LaTeXNoob
      8 hours ago













      @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

      – Black Mild
      8 hours ago





      @ferahfeza of course this okay, just change +(4,-2) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4; to +(4,-1.5) node[box] (b3) block3 +(-3,-1.5) node[box] (b4) block4;

      – Black Mild
      8 hours ago











      1














      With forest you can automatize several things. In particular, you can leave the decision whether or not a node is a decision to forest.



      documentclass[tikz,border=3.14mm]standalone
      usepackage[edges]forest
      usetikzlibraryshapes.geometric
      begindocument
      beginforest
      forked edges,
      for tree=l sep=3em,s sep=3em,edge=-stealth,
      where n children=2diamondrectangle,inner sep=1ex,draw,
      if n=1edge label=node [pos=0.25, below] yes edge label=node [pos=0.25, below] no
      [decision 1
      [block 1,alias=b1]
      [decision 2,alias=d2
      [block 2]
      [block 3]
      ]
      ]
      draw[-stealth] (b1) -- (d2) node[midway,above]pft;
      endforest
      enddocument


      enter image description here






      share|improve this answer



























        1














        With forest you can automatize several things. In particular, you can leave the decision whether or not a node is a decision to forest.



        documentclass[tikz,border=3.14mm]standalone
        usepackage[edges]forest
        usetikzlibraryshapes.geometric
        begindocument
        beginforest
        forked edges,
        for tree=l sep=3em,s sep=3em,edge=-stealth,
        where n children=2diamondrectangle,inner sep=1ex,draw,
        if n=1edge label=node [pos=0.25, below] yes edge label=node [pos=0.25, below] no
        [decision 1
        [block 1,alias=b1]
        [decision 2,alias=d2
        [block 2]
        [block 3]
        ]
        ]
        draw[-stealth] (b1) -- (d2) node[midway,above]pft;
        endforest
        enddocument


        enter image description here






        share|improve this answer

























          1












          1








          1







          With forest you can automatize several things. In particular, you can leave the decision whether or not a node is a decision to forest.



          documentclass[tikz,border=3.14mm]standalone
          usepackage[edges]forest
          usetikzlibraryshapes.geometric
          begindocument
          beginforest
          forked edges,
          for tree=l sep=3em,s sep=3em,edge=-stealth,
          where n children=2diamondrectangle,inner sep=1ex,draw,
          if n=1edge label=node [pos=0.25, below] yes edge label=node [pos=0.25, below] no
          [decision 1
          [block 1,alias=b1]
          [decision 2,alias=d2
          [block 2]
          [block 3]
          ]
          ]
          draw[-stealth] (b1) -- (d2) node[midway,above]pft;
          endforest
          enddocument


          enter image description here






          share|improve this answer













          With forest you can automatize several things. In particular, you can leave the decision whether or not a node is a decision to forest.



          documentclass[tikz,border=3.14mm]standalone
          usepackage[edges]forest
          usetikzlibraryshapes.geometric
          begindocument
          beginforest
          forked edges,
          for tree=l sep=3em,s sep=3em,edge=-stealth,
          where n children=2diamondrectangle,inner sep=1ex,draw,
          if n=1edge label=node [pos=0.25, below] yes edge label=node [pos=0.25, below] no
          [decision 1
          [block 1,alias=b1]
          [decision 2,alias=d2
          [block 2]
          [block 3]
          ]
          ]
          draw[-stealth] (b1) -- (d2) node[midway,above]pft;
          endforest
          enddocument


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 8 hours ago









          marmotmarmot

          140k6 gold badges184 silver badges338 bronze badges




          140k6 gold badges184 silver badges338 bronze badges





















              1














              For fun, a simple pstricks code:



              documentclass[border=6pt]standalone%
              usepackage[utf8]inputenc
              usepackage[T1]fontenc
              usepackagepst-node
              newcommandpsstrutrule[-0.55cm]0pt1.25cm
              newcommanddiastrutrule[-0.65cm]0pt1.45cm%

              begindocument

              sffamilyeverymathdisplaystyle%
              pssetframesep=1pt, arrows=->, arrowinset=0.1,linejoin=1
              beginpsmatrix[rowsep=2.5cm, colsep=2cm, emnode=r]%
              %%% Nodes
              & dianode[framesep = -2pt]d1diastrut Decision 1\
              [name=b1] psframeboxmakebox[2.5cm]psstrut block 1 & & dianode[framesep = -2pt]d2diastrut Decision 2\
              & [name=b2] psframeboxmakebox[2.5cm]psstrut block 2 & & [name=b3] psframeboxmakebox[2.5cm]psstrut block 3
              %%% Node connections
              pssetangleA=-90, angleB=90, armA=0.8cm, armB=0.8cm, labelsep=2pt
              ncanglesd1b1nbputyes
              ncanglesd1d2naputno
              nclineb1d2naputsome condition
              ncanglesd2b2nbputyes
              ncanglesd2b3naputno
              endpsmatrix

              enddocument


              enter image description here






              share|improve this answer



























                1














                For fun, a simple pstricks code:



                documentclass[border=6pt]standalone%
                usepackage[utf8]inputenc
                usepackage[T1]fontenc
                usepackagepst-node
                newcommandpsstrutrule[-0.55cm]0pt1.25cm
                newcommanddiastrutrule[-0.65cm]0pt1.45cm%

                begindocument

                sffamilyeverymathdisplaystyle%
                pssetframesep=1pt, arrows=->, arrowinset=0.1,linejoin=1
                beginpsmatrix[rowsep=2.5cm, colsep=2cm, emnode=r]%
                %%% Nodes
                & dianode[framesep = -2pt]d1diastrut Decision 1\
                [name=b1] psframeboxmakebox[2.5cm]psstrut block 1 & & dianode[framesep = -2pt]d2diastrut Decision 2\
                & [name=b2] psframeboxmakebox[2.5cm]psstrut block 2 & & [name=b3] psframeboxmakebox[2.5cm]psstrut block 3
                %%% Node connections
                pssetangleA=-90, angleB=90, armA=0.8cm, armB=0.8cm, labelsep=2pt
                ncanglesd1b1nbputyes
                ncanglesd1d2naputno
                nclineb1d2naputsome condition
                ncanglesd2b2nbputyes
                ncanglesd2b3naputno
                endpsmatrix

                enddocument


                enter image description here






                share|improve this answer

























                  1












                  1








                  1







                  For fun, a simple pstricks code:



                  documentclass[border=6pt]standalone%
                  usepackage[utf8]inputenc
                  usepackage[T1]fontenc
                  usepackagepst-node
                  newcommandpsstrutrule[-0.55cm]0pt1.25cm
                  newcommanddiastrutrule[-0.65cm]0pt1.45cm%

                  begindocument

                  sffamilyeverymathdisplaystyle%
                  pssetframesep=1pt, arrows=->, arrowinset=0.1,linejoin=1
                  beginpsmatrix[rowsep=2.5cm, colsep=2cm, emnode=r]%
                  %%% Nodes
                  & dianode[framesep = -2pt]d1diastrut Decision 1\
                  [name=b1] psframeboxmakebox[2.5cm]psstrut block 1 & & dianode[framesep = -2pt]d2diastrut Decision 2\
                  & [name=b2] psframeboxmakebox[2.5cm]psstrut block 2 & & [name=b3] psframeboxmakebox[2.5cm]psstrut block 3
                  %%% Node connections
                  pssetangleA=-90, angleB=90, armA=0.8cm, armB=0.8cm, labelsep=2pt
                  ncanglesd1b1nbputyes
                  ncanglesd1d2naputno
                  nclineb1d2naputsome condition
                  ncanglesd2b2nbputyes
                  ncanglesd2b3naputno
                  endpsmatrix

                  enddocument


                  enter image description here






                  share|improve this answer













                  For fun, a simple pstricks code:



                  documentclass[border=6pt]standalone%
                  usepackage[utf8]inputenc
                  usepackage[T1]fontenc
                  usepackagepst-node
                  newcommandpsstrutrule[-0.55cm]0pt1.25cm
                  newcommanddiastrutrule[-0.65cm]0pt1.45cm%

                  begindocument

                  sffamilyeverymathdisplaystyle%
                  pssetframesep=1pt, arrows=->, arrowinset=0.1,linejoin=1
                  beginpsmatrix[rowsep=2.5cm, colsep=2cm, emnode=r]%
                  %%% Nodes
                  & dianode[framesep = -2pt]d1diastrut Decision 1\
                  [name=b1] psframeboxmakebox[2.5cm]psstrut block 1 & & dianode[framesep = -2pt]d2diastrut Decision 2\
                  & [name=b2] psframeboxmakebox[2.5cm]psstrut block 2 & & [name=b3] psframeboxmakebox[2.5cm]psstrut block 3
                  %%% Node connections
                  pssetangleA=-90, angleB=90, armA=0.8cm, armB=0.8cm, labelsep=2pt
                  ncanglesd1b1nbputyes
                  ncanglesd1d2naputno
                  nclineb1d2naputsome condition
                  ncanglesd2b2nbputyes
                  ncanglesd2b3naputno
                  endpsmatrix

                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 7 hours ago









                  BernardBernard

                  182k7 gold badges83 silver badges216 bronze badges




                  182k7 gold badges83 silver badges216 bronze badges




















                      LaTeXNoob is a new contributor. Be nice, and check out our Code of Conduct.









                      draft saved

                      draft discarded


















                      LaTeXNoob is a new contributor. Be nice, and check out our Code of Conduct.












                      LaTeXNoob is a new contributor. Be nice, and check out our Code of Conduct.











                      LaTeXNoob is a new contributor. Be nice, and check out our Code of Conduct.














                      Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f497864%2fhow-to-draw-a-diagram-like-this-with-tikz%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

                      Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

                      Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її