この図で、マークした矢印を削除したいのですが、どうすればいいでしょうか? 以下にコードを添付しました:
\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{arrows,calc,positioning}
\tikzset{
block/.style = {draw, rectangle,
minimum height=1cm,
minimum width=2cm},
input/.style = {coordinate,node distance=1cm},
out/.style = {coordinate,node distance=4cm},
output/.style = {coordinate,node distance=1cm},
arrow/.style={draw, -latex,node distance=2cm},
pinstyle/.style = {pin edge={latex-, black,node distance=2cm}},
sum/.style = {draw, circle, node distance=1cm},
point/.style = {draw, fill=black, circle, minimum size=0.08mm, node distance=1.5cm, inner sep=0pt},
}
\begin{document}
\begin{center}
\begin{tikzpicture}[auto,>=latex']
% Start by placing nodes
\node [input, name=input] {};
\node [block, right=1cm of input] (controller) {{$?$}};
\node [block, right=1cm of controller] (system) {$\mathcal {A},\mathcal {B}$};
\node [block, right=1cm of system] (C) {$\mathcal {C}$};
\node [output, right=1cm of C] (output) {};
%\node [block, below=1cm of C] (L) {{$L$}};
\node [point, below =1cm of C] (point0){};
% Connect away!
\draw [->] ([xshift=-1cm] input) -- (input) -- node {$u$} (controller);
\draw [->] (controller) -- (system);
\draw [->] (system) -- (C);
\draw [->] (C) -- node [name=y] {$y$} (output) -- ([xshift=1cm] output);
\draw [->] (system) -- node [name=x] {$x$} (C);
\draw [->] (output) |- node[name=u] {} (point0);
\draw [->] (point0) -- (input |- point0) |- ([yshift=-0.5cm] controller);
\end{tikzpicture}
\end{center}
\end{document}
答え1
分析:
問題は最後の 2 つの\draw
文で発生します。
- 中間点を導入する
(point0)
- それは構わない、時には他に選択肢がないこともあるから
- ただし、
\draw[->] ...;
その後に が続くと\draw[->] ...;
アーティファクトが作成されます。
解決:
2 つのステートメントを 1 つに結合します。
- (point0)まで描画する
\draw [->] (output) |- node[name=u] {} (point0)
- そして、同じ位置から再開し、次のようにパスを終了します。
(point0) -- (input |- point0) |- ([yshift=-0.5cm] controller);
- 結果は次の長い文になります:
\draw [->] (output) |- node[name=u] {} (point0)(point0) -- (input |- point0) |- ([yshift=-0.5cm] controller);
それは一つの方法です。
\documentclass[]{article}
\usepackage{tikz}
\usetikzlibrary{shapes,arrows}
\usetikzlibrary{arrows,calc,positioning}
\tikzset{
block/.style = {draw, rectangle,
minimum height=1cm,
minimum width=2cm},
input/.style = {coordinate,node distance=1cm},
out/.style = {coordinate,node distance=4cm},
output/.style = {coordinate,node distance=1cm},
arrow/.style={draw, -latex,node distance=2cm},
pinstyle/.style = {pin edge={latex-, black,node distance=2cm}},
sum/.style = {draw, circle, node distance=1cm},
point/.style = {draw, fill=black, circle, minimum size=0.08mm, node distance=1.5cm, inner sep=0pt},
}
\begin{document}
\begin{center}
\begin{tikzpicture}[auto,>=latex']
% Start by placing nodes
\node [input, name=input] {};
\node [block, right=1cm of input] (controller) {{$?$}};
\node [block, right=1cm of controller] (system) {$\mathcal {A},\mathcal {B}$};
\node [block, right=1cm of system] (C) {$\mathcal {C}$};
\node [output, right=1cm of C] (output) {};
%\node [block, below=1cm of C] (L) {{$L$}};
\node [point, below =1cm of C] (point0){};
% Connect away!
\draw [->] ([xshift=-1cm] input) -- (input) -- node {$u$} (controller);
\draw [->] (controller) -- (system);
\draw [->] (system) -- (C);
\draw [->] (C) -- node [name=y] {$y$} (output) -- ([xshift=1cm] output);
\draw [->] (system) -- node [name=x] {$x$} (C);
\draw [->] (output) |- node[name=u] {} (point0)(point0) -- (input |- point0) |- ([yshift=-0.5cm] controller);
\end{tikzpicture}
\end{center}
\end{document}