Skip to content

Commit

Permalink
found how to align text
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillermo Durand committed Dec 19, 2024
1 parent c92823f commit 8ad4ff2
Showing 1 changed file with 43 additions and 39 deletions.
82 changes: 43 additions & 39 deletions tikz/tikz.tex
Original file line number Diff line number Diff line change
Expand Up @@ -6,53 +6,57 @@
\begin{document}


\begin{tikzpicture}[scale=0.85]
\tikzstyle{quadri}=[circle,draw,text=black, thick]
\tikzstyle{estun}=[->,>=latex,very thick]
\node[quadri] (R1) at (0,3) {$R_1$};
\node[quadri] (R2) at (-2,1) {$R_2$};
\node[quadri] (R3) at (0,1) {$R_3$};
\node[quadri] (R4) at (2,1) {$R_4$};
\node[quadri] (R5) at (0,-1) {$R_5$};
\node[quadri] (R6) at (1.5,-1) {$R_6$};
\node[quadri] (R7) at (2.5,-1) {$R_7$};
\node[quadri] (R8) at (4,3) {$R_8$};
\node[quadri] (R9) at (4,1) {$R_9$};
\draw[estun] (R1)--(R2);
\draw[estun] (R1)--(R3);
\draw[estun] (R1)--(R4);
\draw[estun] (R3)--(R5);
\draw[estun] (R4)--(R6);
\draw[estun] (R4)--(R7);
\draw[estun] (R8)--(R9);
\end{tikzpicture}
%\begin{tikzpicture}[scale=0.85]
% \tikzstyle{quadri}=[circle,draw,text=black, thick]
% \tikzstyle{estun}=[->,>=latex,very thick]
% \node[quadri] (R1) at (0,3) {$R_1$};
% \node[quadri] (R2) at (-2,1) {$R_2$};
% \node[quadri] (R3) at (0,1) {$R_3$};
% \node[quadri] (R4) at (2,1) {$R_4$};
% \node[quadri] (R5) at (0,-1) {$R_5$};
% \node[quadri] (R6) at (1.5,-1) {$R_6$};
% \node[quadri] (R7) at (2.5,-1) {$R_7$};
% \node[quadri] (R8) at (4,3) {$R_8$};
% \node[quadri] (R9) at (4,1) {$R_9$};
% \draw[estun] (R1)--(R2);
% \draw[estun] (R1)--(R3);
% \draw[estun] (R1)--(R4);
% \draw[estun] (R3)--(R5);
% \draw[estun] (R4)--(R6);
% \draw[estun] (R4)--(R7);
% \draw[estun] (R8)--(R9);
%\end{tikzpicture}


\begin{tikzpicture}[scale=1]

\begin{tikzpicture}[scale=0.85]
\tikzstyle{quadri}=[circle,draw,text=black,thick]
\tikzstyle{estun}=[->,>=latex,very thick]
\node[quadri] (R1) at (0,3) {$P_{1:5}$};
\node[quadri, fill=gray!25] (R2) at (-2,1) {$P_1$};
\node[quadri] (R3) at (0,1) {$P_{2:3}$};
\node[quadri] (R4) at (2,1) {$P_{4:5}$};

\node[quadri, align=center] (P15) at (0,3) {$P_{1:5}$\\text};
\node[quadri, fill=gray!25] (P1) at (-2,1) {$P_1$};
\node[quadri] (P23) at (0,1) {$P_{2:3}$};
\node[quadri] (P45) at (2,1) {$P_{4:5}$};
\node[quadri, dashed,fill=gray!25] (P2) at (-0.5,-1) {$P_2$};
\node[quadri,fill=gray!25] (R5) at (0.5,-1) {$P_3$};
\node[quadri,fill=gray!25] (R6) at (1.5,-1) {$P_4$};
\node[quadri,fill=gray!25] (R7) at (2.5,-1) {$P_5$};
\node[quadri] (R8) at (4,3) {$P_{6:7}$};
\node[quadri,fill=gray!25] (P3) at (0.5,-1) {$P_3$};
\node[quadri,fill=gray!25] (P4) at (1.5,-1) {$P_4$};
\node[quadri,fill=gray!25] (P5) at (2.5,-1) {$P_5$};
\node[quadri] (P67) at (4,3) {$P_{6:7}$};
\node[quadri,dashed,fill=gray!25] (P6) at (3.5,1) {$P_6$};
\node[quadri,fill=gray!25] (R9) at (4.5,1) {$P_7$};
\node[quadri,fill=gray!25] (P7) at (4.5,1) {$P_7$};
\node[quadri,dashed,fill=gray!25] (P8) at (6,3) {$P_8$};
\draw[estun] (R1)--(R2);
\draw[estun] (R1)--(R3);
\draw[estun] (R1)--(R4);
\draw[estun] (R3)--(R5);
\draw[estun,dashed,thick] (R3)--(P2);
\draw[estun] (R4)--(R6);
\draw[estun] (R4)--(R7);
\draw[estun] (R8)--(R9);
\draw[estun,dashed,thick] (R8)--(P6);



\draw[estun] (P15)--(P1);
\draw[estun] (P15)--(P23);
\draw[estun] (P15)--(P45);
\draw[estun] (P23)--(P3);
\draw[estun,dashed] (P23)--(P2);
\draw[estun] (P45)--(P4);
\draw[estun] (P45)--(P5);
\draw[estun] (P67)--(P7);
\draw[estun,dashed] (P67)--(P6);
\end{tikzpicture}


Expand Down

0 comments on commit 8ad4ff2

Please sign in to comment.