Positioning of a tikz picture
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I have to tikz pictures in a figure. Here is the code:
beginfigure[H]
begintikzpicture
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
As you can see the drawings stand not side by side, the second is little below of the first.
So if anyone has a time to answer please suggest ma a possible solution. How can I have the three pentagons side by side?
tikz-styles graphs
add a comment |Â
up vote
2
down vote
favorite
I have to tikz pictures in a figure. Here is the code:
beginfigure[H]
begintikzpicture
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
As you can see the drawings stand not side by side, the second is little below of the first.
So if anyone has a time to answer please suggest ma a possible solution. How can I have the three pentagons side by side?
tikz-styles graphs
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I have to tikz pictures in a figure. Here is the code:
beginfigure[H]
begintikzpicture
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
As you can see the drawings stand not side by side, the second is little below of the first.
So if anyone has a time to answer please suggest ma a possible solution. How can I have the three pentagons side by side?
tikz-styles graphs
I have to tikz pictures in a figure. Here is the code:
beginfigure[H]
begintikzpicture
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
As you can see the drawings stand not side by side, the second is little below of the first.
So if anyone has a time to answer please suggest ma a possible solution. How can I have the three pentagons side by side?
tikz-styles graphs
tikz-styles graphs
asked 1 hour ago
Evgeny Kuznetsov
1285
1285
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
Just add the baseline
key to both tikz pictures.
documentclassarticle
usepackagetikz
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture[baseline]
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
up vote
1
down vote
Or draw both figures inside same tikzpicture
:
documentclassarticle
usepackagetikz
usetikzlibrarypositioning
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
% endtikzpicture
% hspace0.3cm
% begintikzpicture[baseline]
beginscope[every node/.style=draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw node[right=3cm of b3] (3) [label=above:$3$] (3)
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endscope
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
Just add the baseline
key to both tikz pictures.
documentclassarticle
usepackagetikz
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture[baseline]
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
up vote
2
down vote
Just add the baseline
key to both tikz pictures.
documentclassarticle
usepackagetikz
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture[baseline]
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
up vote
2
down vote
up vote
2
down vote
Just add the baseline
key to both tikz pictures.
documentclassarticle
usepackagetikz
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture[baseline]
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
enddocument
Just add the baseline
key to both tikz pictures.
documentclassarticle
usepackagetikz
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
endtikzpicture
hspace0.3cm
begintikzpicture[baseline]
tikzstyleevery node=[draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw (0,0) node (3) [label=above:$3$]
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endtikzpicture
caption
endfigure
enddocument
answered 48 mins ago
NBur
1,18813
1,18813
add a comment |Â
add a comment |Â
up vote
1
down vote
Or draw both figures inside same tikzpicture
:
documentclassarticle
usepackagetikz
usetikzlibrarypositioning
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
% endtikzpicture
% hspace0.3cm
% begintikzpicture[baseline]
beginscope[every node/.style=draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw node[right=3cm of b3] (3) [label=above:$3$] (3)
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endscope
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
up vote
1
down vote
Or draw both figures inside same tikzpicture
:
documentclassarticle
usepackagetikz
usetikzlibrarypositioning
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
% endtikzpicture
% hspace0.3cm
% begintikzpicture[baseline]
beginscope[every node/.style=draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw node[right=3cm of b3] (3) [label=above:$3$] (3)
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endscope
endtikzpicture
caption
endfigure
enddocument
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Or draw both figures inside same tikzpicture
:
documentclassarticle
usepackagetikz
usetikzlibrarypositioning
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
% endtikzpicture
% hspace0.3cm
% begintikzpicture[baseline]
beginscope[every node/.style=draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw node[right=3cm of b3] (3) [label=above:$3$] (3)
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endscope
endtikzpicture
caption
endfigure
enddocument
Or draw both figures inside same tikzpicture
:
documentclassarticle
usepackagetikz
usetikzlibrarypositioning
begindocument
beginfigure[h]
begintikzpicture[baseline]
draw (0,0) node (a1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_1$]
-- ++(252:1.2cm) node (a2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_2$]
-- ++(324:1.2cm) node (a3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt,label=left:$a_3$]
-- ++(36:1.2cm) node (a4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=left:$a_4$]
-- ++(108:1.2cm) node (a5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=above:$a_5$]
-- (a1);
draw (0.75,-2.2) node (aux1)[minimum size=0pt, inner sep=0pt];
draw (4,0) node (b3) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_3$]
-- ++(216:1.2cm) node (b2) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_2$]
-- ++(288:1.2cm) node (b1) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=below:$b_1$]
-- ++(0:1.2cm) node (b5) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_5$]
-- ++(72:1.2cm) node (b4) [draw,circle,fill=white,minimum size=4pt, inner sep=0pt, label=right:$b_4$]
-- (b3);
draw (4,0.4) node (aux2)[minimum size=0pt, inner sep=0pt];
draw (a1) -- (a3);
draw (a5) -- (a3);
draw (b3) -- (b1);
draw (b3) -- (b5);
draw (a5) -- (b2);
draw (a4) -- (b1);
draw (a2) to [out=-80,in=180] (aux1);
draw (aux1) to [out=0,in=-100] (a4);
draw (a2) to [out=-90,in=-110] (b5);
draw (b2) to [out=90,in=180] (aux2);
draw (aux2) to [out=-10,in=110] (b4);
%draw (b2) to [out=80,in=100] (b4);
draw (a1) to [out=70,in=90] (b4);
% endtikzpicture
% hspace0.3cm
% begintikzpicture[baseline]
beginscope[every node/.style=draw,circle,fill=white,minimum size=4pt, inner sep=0pt]
draw node[right=3cm of b3] (3) [label=above:$3$] (3)
-- ++(216:1.2cm) node (2) [label=left:$2$]
-- ++(288:1.2cm) node (1) [label=left:$1$]
-- ++(0:1.2cm) node (5) [label=right:$5$]
-- ++(72:1.2cm) node (4) [label=right:$4$]
-- (3);
draw (1) -- (3);
draw (1) -- (4);
draw (2) -- (4);
draw (2) -- (5);
draw (3) -- (5);
endscope
endtikzpicture
caption
endfigure
enddocument
answered 23 mins ago
Ignasi
88.4k4159296
88.4k4159296
add a comment |Â
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455629%2fpositioning-of-a-tikz-picture%23new-answer', 'question_page');
);
Post as a guest
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
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
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