
화살표를 사용하지 않고 다음 그래프를 작성하려고 합니다.
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems,arrows.meta}
\newcount\quadrant
\pgfdeclarelindenmayersystem{cayley}{
\rule{A -> B [ R [A] [+A] [-A] ]}
\symbol{R}{ \pgflsystemstep=0.5\pgflsystemstep }
\symbol{-}{
\pgfmathsetcount\quadrant{Mod(\quadrant+1,4)}
\tikzset{rotate=90}}
\symbol{+}{
\pgfmathsetcount\quadrant{Mod(\quadrant-1,4)}
\tikzset{rotate=-90}
}
\symbol{B}{
\draw [dot-cayley] (0,0) -- (\pgflsystemstep,0)
node [font=\footnotesize, midway,
anchor={270-mod(\the\quadrant,2)*90}, inner sep=.5ex]
{\ifcase\quadrant$ $\or$ $\or$ $\or$ $\fi};
\tikzset{xshift=\pgflsystemstep}} }
\tikzset{
dot/.tip={Circle[sep=-1.5pt,length=3pt]}, cayley/.tip={Stealth[]dot[]} }
\begin{document}
\begin{tikzpicture}
\draw l-system [l-system={cayley, axiom=[A] [+A] [-A] [++A], step=2cm, order=3}];
\end{tikzpicture}
\end{document}
결과는 다음과 같습니다.
하지만 나는 화살 없이 그것을 원한다. 나는 이것을하는 방법을 모릅니다. 나는 이것에 익숙하지 않습니다. 도와주세요.
답변1
이와 같이?
여기에서 제거하세요 Stealth[]
.
\tikzset{
dot/.tip={Circle[sep=-1.5pt,length=3pt]}, cayley/.tip={Stealth[]dot[]} }
완전한 코드:
\documentclass[11pt]{article}
\usepackage{tikz}
\usetikzlibrary{lindenmayersystems,arrows.meta}
\newcount\quadrant
\pgfdeclarelindenmayersystem{cayley}{
\rule{A -> B [ R [A] [+A] [-A] ]}
\symbol{R}{ \pgflsystemstep=0.5\pgflsystemstep }
\symbol{-}{
\pgfmathsetcount\quadrant{Mod(\quadrant+1,4)}
\tikzset{rotate=90}}
\symbol{+}{
\pgfmathsetcount\quadrant{Mod(\quadrant-1,4)}
\tikzset{rotate=-90}
}
\symbol{B}{
\draw [dot-cayley] (0,0) -- (\pgflsystemstep,0)
node [font=\footnotesize, midway,
anchor={270-mod(\the\quadrant,2)*90}, inner sep=.5ex]
{\ifcase\quadrant$ $\or$ $\or$ $\or$ $\fi};
\tikzset{xshift=\pgflsystemstep}} }
\tikzset{
dot/.tip={Circle[sep=-1.5pt,length=3pt]}, cayley/.tip={dot[]} }
\begin{document}
\begin{tikzpicture}
\draw l-system [l-system={cayley, axiom=[A] [+A] [-A] [++A], step=2cm, order=3}];
\end{tikzpicture}
\end{document}