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
When airplanes disconnect from a tanker during air to air refueling, why do they bank so sharply to the right?
Only print output after finding pattern
Implement the Thanos sorting algorithm
How can I get through very long and very dry, but also very useful technical documents when learning a new tool?
Does it take more energy to get to Venus or to Mars?
Apart from "berlinern", do any other German dialects have a corresponding verb?
Is it a good idea to use COLUMN AS (left([Another_Column],(4)) instead of LEFT in the select?
What is the difference between "behavior" and "behaviour"?
Describing a person. What needs to be mentioned?
What does "Its cash flow is deeply negative" mean?
How to Reset Passwords on Multiple Websites Easily?
Whats the best way to handle refactoring a big file?
Why is there a PLL in CPU?
Is it my responsibility to learn a new technology in my own time my employer wants to implement?
Return the Closest Prime Number
How easy is it to start Magic from scratch?
What does this shorthand mean?
The King's new dress
Why did we only see the N-1 starfighters in one film?
'Given that' in a matrix
Anatomically Correct Strange Women In Ponds Distributing Swords
How long to clear the 'suck zone' of a turbofan after start is initiated?
How to count occurrences of text in a file?
Any way to transfer all permissions from one role to another?
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
This picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?

tikz-pgf
add a comment |
This picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?

tikz-pgf
2
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago
add a comment |
This picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?

tikz-pgf
This picture represented a graph which is connected to every node. How to use tikz to draw this kind of graph?

tikz-pgf
tikz-pgf
edited 10 hours ago
Robiul Islam
asked 10 hours ago
Robiul IslamRobiul Islam
356
356
2
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago
add a comment |
2
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago
2
2
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago
add a comment |
3 Answers
3
active
oldest
votes
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

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.

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.
add a comment |
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

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

documentclassarticle
usepackagetikZ
usetikzlibrarypositioning
tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm
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.north east] at (a.south east) [dot] ;
node[label=a.north east] at (a.south west) [dot] ;
endtikzpicture
enddocument
You may want to edit your answer a little: the second code is not compilable becausesquarenodeis undefined, and you should usetikzas package name, nottikZ!
– JouleV
8 hours ago
add a comment |
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

add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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

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.

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.
add a comment |
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

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.

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.
add a comment |
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

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.

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.
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

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.

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.
answered 8 hours ago
JouleVJouleV
8,64222154
8,64222154
add a comment |
add a comment |
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

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

documentclassarticle
usepackagetikZ
usetikzlibrarypositioning
tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm
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.north east] at (a.south east) [dot] ;
node[label=a.north east] at (a.south west) [dot] ;
endtikzpicture
enddocument
You may want to edit your answer a little: the second code is not compilable becausesquarenodeis undefined, and you should usetikzas package name, nottikZ!
– JouleV
8 hours ago
add a comment |
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

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

documentclassarticle
usepackagetikZ
usetikzlibrarypositioning
tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm
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.north east] at (a.south east) [dot] ;
node[label=a.north east] at (a.south west) [dot] ;
endtikzpicture
enddocument
You may want to edit your answer a little: the second code is not compilable becausesquarenodeis undefined, and you should usetikzas package name, nottikZ!
– JouleV
8 hours ago
add a comment |
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

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

documentclassarticle
usepackagetikZ
usetikzlibrarypositioning
tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm
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.north east] at (a.south east) [dot] ;
node[label=a.north east] at (a.south west) [dot] ;
endtikzpicture
enddocument
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

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

documentclassarticle
usepackagetikZ
usetikzlibrarypositioning
tikzsetdot/.style =
shape = circle,
draw = black,
fill = black,
minimum size = 0.2cm
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.north east] at (a.south east) [dot] ;
node[label=a.north east] at (a.south west) [dot] ;
endtikzpicture
enddocument
edited 9 hours ago
answered 9 hours ago
subham sonisubham soni
4,69483185
4,69483185
You may want to edit your answer a little: the second code is not compilable becausesquarenodeis undefined, and you should usetikzas package name, nottikZ!
– JouleV
8 hours ago
add a comment |
You may want to edit your answer a little: the second code is not compilable becausesquarenodeis undefined, and you should usetikzas package name, nottikZ!
– JouleV
8 hours 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
8 hours 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
8 hours ago
add a comment |
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

add a comment |
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

add a comment |
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

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

answered 4 hours ago
CarLaTeXCarLaTeX
34.2k552141
34.2k552141
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
2
Which drawing do you want? First or second? Btw, give a MWE .
– ferahfeza
9 hours ago