다음 LaTeX 코드는 중복 및불필요한측정값 블록의 화살표 머리.
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes.geometric}
\begin{document}
\begin{tikzpicture}[>=latex']
\tikzset{block/.style= {draw,rectangle,align=center,minimum width=2cm,minimum height=1cm}}
\node [block] (measures) {Measures};
\node [block, above right =2cm of measures](accuracy) {Accuracy};
\node [block, below =0.5cm of accuracy] (precision) {Precision};
\node [block, below =0.5cm of precision] (recall) {Recall};
\node [block, below =0.5cm of recall] (fmeasure) {Fmeasure};
\path[draw,->]
(measures.east) edge (accuracy.west)
(measures.east) edge (precision.west)
(measures.east) edge (recall.west)
(measures.east) edge (fmeasure.west)
;
\end{tikzpicture}
\end{document}
코드는 다음 이미지를 생성합니다.
그것을 제거하는 방법이 있습니까?
답변1
edge
짐승이므로 조심해서 타야 합니다. not ->
옵션에 사용 :edge
\draw
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes.geometric}
\begin{document}
\begin{tikzpicture}[>=latex']
\tikzset{block/.style= {draw,rectangle,align=center,minimum width=2cm,minimum height=1cm}}
\node [block] (measures) {Measures};
\node [block, above right =2cm of measures](accuracy) {Accuracy};
\node [block, below =0.5cm of accuracy] (precision) {Precision};
\node [block, below =0.5cm of precision] (recall) {Recall};
\node [block, below =0.5cm of recall] (fmeasure) {Fmeasure};
\path[draw]
(measures.east) edge[->] (accuracy.west)
(measures.east) edge[->] (precision.west)
(measures.east) edge[->] (recall.west)
(measures.east) edge[->] (fmeasure.west)
;
\end{tikzpicture}
\end{document}
답변2
forest
옵션 을 자동으로 제한하는 솔루션 edge
:
\documentclass[tikz,border=5pt]{standalone}
\usepackage{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
for tree={
grow'=0,
parent anchor=east,
child anchor=west,
draw,
minimum width=20mm,
minimum height=10mm,
edge={-{Latex}},
l sep+=10mm,
}
[Measures
[Accuracy]
[Precision]
[Recall]
[F measure]
]
\end{forest}
\end{document}