How to draw fully connected graph link picture bellow in latex? The Next CEO of Stack OverflowFully connected network diagramHow to draw a complex graphHow to draw a graph with ring in latex?How to return a list of connected nodes? TikzI have to draw this graph by tikzHow to draw connected arrows?How to draw a graph in LATEX?Help me how to draw this picture in tikz?How to draw a graph with shaded area by using TikzHow to add distance between nodes in tikz picture

A Man With a Stainless Steel Endoskeleton (like The Terminator) Fighting Cloaked Aliens Only He Can See

RigExpert AA-35 - Interpreting The Information

Why is the US ranked as #45 in Press Freedom ratings, despite its extremely permissive free speech laws?

Won the lottery - how do I keep the money?

Is micro rebar a better way to reinforce concrete than rebar?

Why doesn't UK go for the same deal Japan has with EU to resolve Brexit?

"misplaced omit" error when >centering columns

Is there always a complete, orthogonal set of unitary matrices?

Can a Bladesinger Wizard use Bladesong with a Hand Crossbow?

How to invert MapIndexed on a ragged structure? How to construct a tree from rules?

0 rank tensor vs 1D vector

Is a distribution that is normal, but highly skewed considered Gaussian?

What flight has the highest ratio of time difference to flight time?

Example of a Mathematician/Physicist whose Other Publications during their PhD eclipsed their PhD Thesis

Does increasing your ability score affect your main stat?

Help understanding this unsettling image of Titan, Epimetheus, and Saturn's rings?

What is the value of α and β in a triangle?

Why isn't the Mueller report being released completely and unredacted?

Is wanting to ask what to write an indication that you need to change your story?

How a 64-bit process virtual address space is divided in Linux?

No sign flipping while figuring out the emf of voltaic cell?

Is there a difference between "Fahrstuhl" and "Aufzug"

Chain wire methods together in Lightning Web Components

How do I align (1) and (2)?



How to draw fully connected graph link picture bellow in latex?



The Next CEO of Stack OverflowFully connected network diagramHow to draw a complex graphHow to draw a graph with ring in latex?How to return a list of connected nodes? TikzI have to draw this graph by tikzHow to draw connected arrows?How to draw a graph in LATEX?Help me how to draw this picture in tikz?How to draw a graph with shaded area by using TikzHow to add distance between nodes in tikz picture










2















enter image description hereThis picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?



enter image description here










share|improve this question



















  • 2





    Which drawing do you want? First or second? Btw, give a MWE .

    – ferahfeza
    2 days ago















2















enter image description hereThis picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?



enter image description here










share|improve this question



















  • 2





    Which drawing do you want? First or second? Btw, give a MWE .

    – ferahfeza
    2 days ago













2












2








2


1






enter image description hereThis picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?



enter image description here










share|improve this question
















enter image description hereThis picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?



enter image description here







tikz-pgf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 2 days ago







Robiul Islam

















asked 2 days ago









Robiul IslamRobiul Islam

356




356







  • 2





    Which drawing do you want? First or second? Btw, give a MWE .

    – ferahfeza
    2 days ago












  • 2





    Which drawing do you want? First or second? Btw, give a MWE .

    – ferahfeza
    2 days ago







2




2





Which drawing do you want? First or second? Btw, give a MWE .

– ferahfeza
2 days ago





Which drawing do you want? First or second? Btw, give a MWE .

– ferahfeza
2 days ago










3 Answers
3






active

oldest

votes


















8














This is not your graph, but my recommended variant of it.



documentclass[tikz]standalone
begindocument
begintikzpicture
beginscope[every node/.style=circle,minimum size=.75cm,draw]
node (a) at (0,2) Goal;
node (c2) at (0,0) $c_2$;
node (c3) at (2,0) $c_3$;
node (c1) at (-2,0) $c_1$;
node (a1) at (-1,-2) $a_1$;
node (a2) at (1,-2) $a_2$;
endscope
draw (a)--(c1)--(a1)--(c2)--(a2)--(c3)--(a)--(c2) (c1)--(a2) (c3)--(a1);
endtikzpicture
enddocument


enter image description here



Some notes:



  • The size of the nodes should not be too big. Hence I use minimum size=.75cm.

  • The nodes should be in circle shapes.


  • You should not have all paths from a specific nodes connected. For instance, this is bad, in my opinion.



    enter image description here



    It is even worse if you want to add arrows.



  • The nodes should have a good alignment. In this graph, they should be horizontally centered.


  • Put node label in math mode, if they are something like a, b, m1, n2, etc.





share|improve this answer






























    6














    Based on the pencil drawing, here is a sample code, which you can improve according to your needs:



    documentclassarticle
    usepackagetikz
    usetikzlibrarypositioning

    tikzsetsquarenode/.style =
    shape = rectangle,
    draw = black,
    minimum height = 2cm,
    minimum width = 2cm


    begindocument
    begintikzpicture[node distance=2cm]
    node (a) at (0,0) [squarenode] Goal;
    node[below=of a] (c2) [squarenode] C2;
    node[left=of c2] (c1) [squarenode] C1;
    node[right=of c2] (c3) [squarenode] C3;
    node[below=of c1] (a1) [squarenode] A1;
    node[below=of c2] (a2) [squarenode] A2;

    draw (a.south) to (c1.north);
    draw (a.south) to (c2.north);
    draw (a.south) to (c3.north);
    draw (c1.south) to (a1.north);
    draw (c1.south) to (a2.north west);
    draw (c2.south) to (a2.north);
    draw (c2.south) to (a1.north east);
    draw (c3.south) to (a1.north);
    draw (c3.south) to (a2.north);
    endtikzpicture
    enddocument


    enter image description here



    To understand the anchor points used, refer the diagram and code below:



    enter image description here



    documentclassarticle
    usepackagetikz
    usetikzlibrarypositioning

    tikzsetdot/.style =
    shape = circle,
    draw = black,
    fill = black,
    minimum size = 0.2cm


    tikzsetsquarenode/.style =
    shape = rectangle,
    draw = black,
    minimum height = 10cm,
    minimum width = 10cm


    begindocument
    begintikzpicture[node distance=2cm]
    node (a) at (0,0) [squarenode] ;
    node[label=a.center] at (a.center) [dot] ;
    node[label=a.north] at (a.north) [dot] ;
    node[label=a.south] at (a.south) [dot] ;
    node[label=a.east] at (a.east) [dot] ;
    node[label=a.west] at (a.west) [dot] ;
    node[label=a.north east] at (a.north east) [dot] ;
    node[label=a.north west] at (a.north west) [dot] ;
    node[label=a.south east] at (a.south east) [dot] ;
    node[label=a.south west] at (a.south west) [dot] ;
    endtikzpicture
    enddocument





    share|improve this answer

























    • You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

      – JouleV
      2 days ago











    • @JouleV - done. Thanks :)

      – subham soni
      yesterday


















    2














    I think this is a job for a TikZ matrix.



    With <matrix-name>-<row-number>-<column-number> you can refer to matrix cells as nodes.



    Here you find two versions of the graph, if you want the nodes to be squared, leave out the circle option:



    documentclassbook

    usepackageamsmath
    usepackagetikz
    usetikzlibrarymatrix
    tikzset
    mymatrix/.style=
    matrix of math nodes,
    nodes=draw, circle,
    row sep=10ex,


    begindocument
    begintikzpicture
    matrix[
    mymatrix,
    column sep=3em
    ](mymatr)
    &textGoal\
    C_1 & C_2& C_3\
    A_1 & A_2\
    ;
    foreach ind in 1,2,3
    draw (mymatr-1-2) -- (mymatr-2-ind);
    draw (mymatr-3-1) -- (mymatr-2-ind);
    draw (mymatr-3-2) -- (mymatr-2-ind);

    endtikzpicture

    begintikzpicture
    matrix[
    mymatrix,
    column sep=1.5em
    ](mymatr)
    &&textGoal\
    C_1 && C_2&& C_3\
    &A_1 && A_2\
    ;
    foreach ind in 1,3,5
    draw (mymatr-1-2) -- (mymatr-2-ind);
    draw (mymatr-3-2) -- (mymatr-2-ind);
    draw (mymatr-3-4) -- (mymatr-2-ind);

    endtikzpicture
    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
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f481900%2fhow-to-draw-fully-connected-graph-link-picture-bellow-in-latex%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









      8














      This is not your graph, but my recommended variant of it.



      documentclass[tikz]standalone
      begindocument
      begintikzpicture
      beginscope[every node/.style=circle,minimum size=.75cm,draw]
      node (a) at (0,2) Goal;
      node (c2) at (0,0) $c_2$;
      node (c3) at (2,0) $c_3$;
      node (c1) at (-2,0) $c_1$;
      node (a1) at (-1,-2) $a_1$;
      node (a2) at (1,-2) $a_2$;
      endscope
      draw (a)--(c1)--(a1)--(c2)--(a2)--(c3)--(a)--(c2) (c1)--(a2) (c3)--(a1);
      endtikzpicture
      enddocument


      enter image description here



      Some notes:



      • The size of the nodes should not be too big. Hence I use minimum size=.75cm.

      • The nodes should be in circle shapes.


      • You should not have all paths from a specific nodes connected. For instance, this is bad, in my opinion.



        enter image description here



        It is even worse if you want to add arrows.



      • The nodes should have a good alignment. In this graph, they should be horizontally centered.


      • Put node label in math mode, if they are something like a, b, m1, n2, etc.





      share|improve this answer



























        8














        This is not your graph, but my recommended variant of it.



        documentclass[tikz]standalone
        begindocument
        begintikzpicture
        beginscope[every node/.style=circle,minimum size=.75cm,draw]
        node (a) at (0,2) Goal;
        node (c2) at (0,0) $c_2$;
        node (c3) at (2,0) $c_3$;
        node (c1) at (-2,0) $c_1$;
        node (a1) at (-1,-2) $a_1$;
        node (a2) at (1,-2) $a_2$;
        endscope
        draw (a)--(c1)--(a1)--(c2)--(a2)--(c3)--(a)--(c2) (c1)--(a2) (c3)--(a1);
        endtikzpicture
        enddocument


        enter image description here



        Some notes:



        • The size of the nodes should not be too big. Hence I use minimum size=.75cm.

        • The nodes should be in circle shapes.


        • You should not have all paths from a specific nodes connected. For instance, this is bad, in my opinion.



          enter image description here



          It is even worse if you want to add arrows.



        • The nodes should have a good alignment. In this graph, they should be horizontally centered.


        • Put node label in math mode, if they are something like a, b, m1, n2, etc.





        share|improve this answer

























          8












          8








          8







          This is not your graph, but my recommended variant of it.



          documentclass[tikz]standalone
          begindocument
          begintikzpicture
          beginscope[every node/.style=circle,minimum size=.75cm,draw]
          node (a) at (0,2) Goal;
          node (c2) at (0,0) $c_2$;
          node (c3) at (2,0) $c_3$;
          node (c1) at (-2,0) $c_1$;
          node (a1) at (-1,-2) $a_1$;
          node (a2) at (1,-2) $a_2$;
          endscope
          draw (a)--(c1)--(a1)--(c2)--(a2)--(c3)--(a)--(c2) (c1)--(a2) (c3)--(a1);
          endtikzpicture
          enddocument


          enter image description here



          Some notes:



          • The size of the nodes should not be too big. Hence I use minimum size=.75cm.

          • The nodes should be in circle shapes.


          • You should not have all paths from a specific nodes connected. For instance, this is bad, in my opinion.



            enter image description here



            It is even worse if you want to add arrows.



          • The nodes should have a good alignment. In this graph, they should be horizontally centered.


          • Put node label in math mode, if they are something like a, b, m1, n2, etc.





          share|improve this answer













          This is not your graph, but my recommended variant of it.



          documentclass[tikz]standalone
          begindocument
          begintikzpicture
          beginscope[every node/.style=circle,minimum size=.75cm,draw]
          node (a) at (0,2) Goal;
          node (c2) at (0,0) $c_2$;
          node (c3) at (2,0) $c_3$;
          node (c1) at (-2,0) $c_1$;
          node (a1) at (-1,-2) $a_1$;
          node (a2) at (1,-2) $a_2$;
          endscope
          draw (a)--(c1)--(a1)--(c2)--(a2)--(c3)--(a)--(c2) (c1)--(a2) (c3)--(a1);
          endtikzpicture
          enddocument


          enter image description here



          Some notes:



          • The size of the nodes should not be too big. Hence I use minimum size=.75cm.

          • The nodes should be in circle shapes.


          • You should not have all paths from a specific nodes connected. For instance, this is bad, in my opinion.



            enter image description here



            It is even worse if you want to add arrows.



          • The nodes should have a good alignment. In this graph, they should be horizontally centered.


          • Put node label in math mode, if they are something like a, b, m1, n2, etc.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 2 days ago









          JouleVJouleV

          9,16322256




          9,16322256





















              6














              Based on the pencil drawing, here is a sample code, which you can improve according to your needs:



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 2cm,
              minimum width = 2cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] Goal;
              node[below=of a] (c2) [squarenode] C2;
              node[left=of c2] (c1) [squarenode] C1;
              node[right=of c2] (c3) [squarenode] C3;
              node[below=of c1] (a1) [squarenode] A1;
              node[below=of c2] (a2) [squarenode] A2;

              draw (a.south) to (c1.north);
              draw (a.south) to (c2.north);
              draw (a.south) to (c3.north);
              draw (c1.south) to (a1.north);
              draw (c1.south) to (a2.north west);
              draw (c2.south) to (a2.north);
              draw (c2.south) to (a1.north east);
              draw (c3.south) to (a1.north);
              draw (c3.south) to (a2.north);
              endtikzpicture
              enddocument


              enter image description here



              To understand the anchor points used, refer the diagram and code below:



              enter image description here



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              endtikzpicture
              enddocument





              share|improve this answer

























              • You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

                – JouleV
                2 days ago











              • @JouleV - done. Thanks :)

                – subham soni
                yesterday















              6














              Based on the pencil drawing, here is a sample code, which you can improve according to your needs:



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 2cm,
              minimum width = 2cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] Goal;
              node[below=of a] (c2) [squarenode] C2;
              node[left=of c2] (c1) [squarenode] C1;
              node[right=of c2] (c3) [squarenode] C3;
              node[below=of c1] (a1) [squarenode] A1;
              node[below=of c2] (a2) [squarenode] A2;

              draw (a.south) to (c1.north);
              draw (a.south) to (c2.north);
              draw (a.south) to (c3.north);
              draw (c1.south) to (a1.north);
              draw (c1.south) to (a2.north west);
              draw (c2.south) to (a2.north);
              draw (c2.south) to (a1.north east);
              draw (c3.south) to (a1.north);
              draw (c3.south) to (a2.north);
              endtikzpicture
              enddocument


              enter image description here



              To understand the anchor points used, refer the diagram and code below:



              enter image description here



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              endtikzpicture
              enddocument





              share|improve this answer

























              • You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

                – JouleV
                2 days ago











              • @JouleV - done. Thanks :)

                – subham soni
                yesterday













              6












              6








              6







              Based on the pencil drawing, here is a sample code, which you can improve according to your needs:



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 2cm,
              minimum width = 2cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] Goal;
              node[below=of a] (c2) [squarenode] C2;
              node[left=of c2] (c1) [squarenode] C1;
              node[right=of c2] (c3) [squarenode] C3;
              node[below=of c1] (a1) [squarenode] A1;
              node[below=of c2] (a2) [squarenode] A2;

              draw (a.south) to (c1.north);
              draw (a.south) to (c2.north);
              draw (a.south) to (c3.north);
              draw (c1.south) to (a1.north);
              draw (c1.south) to (a2.north west);
              draw (c2.south) to (a2.north);
              draw (c2.south) to (a1.north east);
              draw (c3.south) to (a1.north);
              draw (c3.south) to (a2.north);
              endtikzpicture
              enddocument


              enter image description here



              To understand the anchor points used, refer the diagram and code below:



              enter image description here



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              endtikzpicture
              enddocument





              share|improve this answer















              Based on the pencil drawing, here is a sample code, which you can improve according to your needs:



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 2cm,
              minimum width = 2cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] Goal;
              node[below=of a] (c2) [squarenode] C2;
              node[left=of c2] (c1) [squarenode] C1;
              node[right=of c2] (c3) [squarenode] C3;
              node[below=of c1] (a1) [squarenode] A1;
              node[below=of c2] (a2) [squarenode] A2;

              draw (a.south) to (c1.north);
              draw (a.south) to (c2.north);
              draw (a.south) to (c3.north);
              draw (c1.south) to (a1.north);
              draw (c1.south) to (a2.north west);
              draw (c2.south) to (a2.north);
              draw (c2.south) to (a1.north east);
              draw (c3.south) to (a1.north);
              draw (c3.south) to (a2.north);
              endtikzpicture
              enddocument


              enter image description here



              To understand the anchor points used, refer the diagram and code below:



              enter image description here



              documentclassarticle
              usepackagetikz
              usetikzlibrarypositioning

              tikzsetdot/.style =
              shape = circle,
              draw = black,
              fill = black,
              minimum size = 0.2cm


              tikzsetsquarenode/.style =
              shape = rectangle,
              draw = black,
              minimum height = 10cm,
              minimum width = 10cm


              begindocument
              begintikzpicture[node distance=2cm]
              node (a) at (0,0) [squarenode] ;
              node[label=a.center] at (a.center) [dot] ;
              node[label=a.north] at (a.north) [dot] ;
              node[label=a.south] at (a.south) [dot] ;
              node[label=a.east] at (a.east) [dot] ;
              node[label=a.west] at (a.west) [dot] ;
              node[label=a.north east] at (a.north east) [dot] ;
              node[label=a.north west] at (a.north west) [dot] ;
              node[label=a.south east] at (a.south east) [dot] ;
              node[label=a.south west] at (a.south west) [dot] ;
              endtikzpicture
              enddocument






              share|improve this answer














              share|improve this answer



              share|improve this answer








              edited yesterday

























              answered 2 days ago









              subham sonisubham soni

              4,86183187




              4,86183187












              • You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

                – JouleV
                2 days ago











              • @JouleV - done. Thanks :)

                – subham soni
                yesterday

















              • You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

                – JouleV
                2 days ago











              • @JouleV - done. Thanks :)

                – subham soni
                yesterday
















              You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

              – JouleV
              2 days ago





              You may want to edit your answer a little: the second code is not compilable because squarenode is undefined, and you should use tikz as package name, not tikZ!

              – JouleV
              2 days ago













              @JouleV - done. Thanks :)

              – subham soni
              yesterday





              @JouleV - done. Thanks :)

              – subham soni
              yesterday











              2














              I think this is a job for a TikZ matrix.



              With <matrix-name>-<row-number>-<column-number> you can refer to matrix cells as nodes.



              Here you find two versions of the graph, if you want the nodes to be squared, leave out the circle option:



              documentclassbook

              usepackageamsmath
              usepackagetikz
              usetikzlibrarymatrix
              tikzset
              mymatrix/.style=
              matrix of math nodes,
              nodes=draw, circle,
              row sep=10ex,


              begindocument
              begintikzpicture
              matrix[
              mymatrix,
              column sep=3em
              ](mymatr)
              &textGoal\
              C_1 & C_2& C_3\
              A_1 & A_2\
              ;
              foreach ind in 1,2,3
              draw (mymatr-1-2) -- (mymatr-2-ind);
              draw (mymatr-3-1) -- (mymatr-2-ind);
              draw (mymatr-3-2) -- (mymatr-2-ind);

              endtikzpicture

              begintikzpicture
              matrix[
              mymatrix,
              column sep=1.5em
              ](mymatr)
              &&textGoal\
              C_1 && C_2&& C_3\
              &A_1 && A_2\
              ;
              foreach ind in 1,3,5
              draw (mymatr-1-2) -- (mymatr-2-ind);
              draw (mymatr-3-2) -- (mymatr-2-ind);
              draw (mymatr-3-4) -- (mymatr-2-ind);

              endtikzpicture
              enddocument


              enter image description here






              share|improve this answer



























                2














                I think this is a job for a TikZ matrix.



                With <matrix-name>-<row-number>-<column-number> you can refer to matrix cells as nodes.



                Here you find two versions of the graph, if you want the nodes to be squared, leave out the circle option:



                documentclassbook

                usepackageamsmath
                usepackagetikz
                usetikzlibrarymatrix
                tikzset
                mymatrix/.style=
                matrix of math nodes,
                nodes=draw, circle,
                row sep=10ex,


                begindocument
                begintikzpicture
                matrix[
                mymatrix,
                column sep=3em
                ](mymatr)
                &textGoal\
                C_1 & C_2& C_3\
                A_1 & A_2\
                ;
                foreach ind in 1,2,3
                draw (mymatr-1-2) -- (mymatr-2-ind);
                draw (mymatr-3-1) -- (mymatr-2-ind);
                draw (mymatr-3-2) -- (mymatr-2-ind);

                endtikzpicture

                begintikzpicture
                matrix[
                mymatrix,
                column sep=1.5em
                ](mymatr)
                &&textGoal\
                C_1 && C_2&& C_3\
                &A_1 && A_2\
                ;
                foreach ind in 1,3,5
                draw (mymatr-1-2) -- (mymatr-2-ind);
                draw (mymatr-3-2) -- (mymatr-2-ind);
                draw (mymatr-3-4) -- (mymatr-2-ind);

                endtikzpicture
                enddocument


                enter image description here






                share|improve this answer

























                  2












                  2








                  2







                  I think this is a job for a TikZ matrix.



                  With <matrix-name>-<row-number>-<column-number> you can refer to matrix cells as nodes.



                  Here you find two versions of the graph, if you want the nodes to be squared, leave out the circle option:



                  documentclassbook

                  usepackageamsmath
                  usepackagetikz
                  usetikzlibrarymatrix
                  tikzset
                  mymatrix/.style=
                  matrix of math nodes,
                  nodes=draw, circle,
                  row sep=10ex,


                  begindocument
                  begintikzpicture
                  matrix[
                  mymatrix,
                  column sep=3em
                  ](mymatr)
                  &textGoal\
                  C_1 & C_2& C_3\
                  A_1 & A_2\
                  ;
                  foreach ind in 1,2,3
                  draw (mymatr-1-2) -- (mymatr-2-ind);
                  draw (mymatr-3-1) -- (mymatr-2-ind);
                  draw (mymatr-3-2) -- (mymatr-2-ind);

                  endtikzpicture

                  begintikzpicture
                  matrix[
                  mymatrix,
                  column sep=1.5em
                  ](mymatr)
                  &&textGoal\
                  C_1 && C_2&& C_3\
                  &A_1 && A_2\
                  ;
                  foreach ind in 1,3,5
                  draw (mymatr-1-2) -- (mymatr-2-ind);
                  draw (mymatr-3-2) -- (mymatr-2-ind);
                  draw (mymatr-3-4) -- (mymatr-2-ind);

                  endtikzpicture
                  enddocument


                  enter image description here






                  share|improve this answer













                  I think this is a job for a TikZ matrix.



                  With <matrix-name>-<row-number>-<column-number> you can refer to matrix cells as nodes.



                  Here you find two versions of the graph, if you want the nodes to be squared, leave out the circle option:



                  documentclassbook

                  usepackageamsmath
                  usepackagetikz
                  usetikzlibrarymatrix
                  tikzset
                  mymatrix/.style=
                  matrix of math nodes,
                  nodes=draw, circle,
                  row sep=10ex,


                  begindocument
                  begintikzpicture
                  matrix[
                  mymatrix,
                  column sep=3em
                  ](mymatr)
                  &textGoal\
                  C_1 & C_2& C_3\
                  A_1 & A_2\
                  ;
                  foreach ind in 1,2,3
                  draw (mymatr-1-2) -- (mymatr-2-ind);
                  draw (mymatr-3-1) -- (mymatr-2-ind);
                  draw (mymatr-3-2) -- (mymatr-2-ind);

                  endtikzpicture

                  begintikzpicture
                  matrix[
                  mymatrix,
                  column sep=1.5em
                  ](mymatr)
                  &&textGoal\
                  C_1 && C_2&& C_3\
                  &A_1 && A_2\
                  ;
                  foreach ind in 1,3,5
                  draw (mymatr-1-2) -- (mymatr-2-ind);
                  draw (mymatr-3-2) -- (mymatr-2-ind);
                  draw (mymatr-3-4) -- (mymatr-2-ind);

                  endtikzpicture
                  enddocument


                  enter image description here







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 2 days ago









                  CarLaTeXCarLaTeX

                  34.3k552141




                  34.3k552141



























                      draft saved

                      draft discarded
















































                      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%2f481900%2fhow-to-draw-fully-connected-graph-link-picture-bellow-in-latex%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

                      Sum ergo cogito? 1 nng

                      419 nièngy_Soadمي 19bal1.5o_g

                      Queiggey Chernihivv 9NnOo i Zw X QqKk LpB