隐藏向量中的 C 标签

隐藏向量中的 C 标签

我有这个代码:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}
\begin{document}

\begin{tikzpicture}
\coordinate (B) at (1,2);
\coordinate (A) at (3,4);

\coordinate (C) at (3,4);


\draw [fill=blue] (B) circle (2pt) node [left] {};
\draw [fill=blue] (A) circle (2pt) node [left] {A1};

\draw [-latex, red, thick] (B) -- (A);

\coordinate (B) at (1,2);
\coordinate (A) at (4,2);

\draw [fill=blue] (B) circle (2pt) node [left] {};
\draw [fill=blue] (A) circle (2pt) node [right] {A2};

\draw [-latex, red, thick] (B) -- (A);

\draw[postaction={decorate,decoration={markings,mark=at position 0.25 with {\arrow[black,line width=1.5pt]{>}}}}](C)node[below]{C}--(A)node[above]{A};

\end{tikzpicture}

We can define the positive combination of $A_1$ and $A_2$ to be the vectors lying in the cone between them. The line that crosses $A_1$ and $A_2$ (their heads) is the affine combination of them (one of the points plays the role of the origin of the axis).

\end{document}

生成如下内容:

在此处输入图片描述

如何让C标签消失?

答案1

node[below]{C}在最后一条命令中删除\draw

下面,您可以找到产生相同输出的代码的简化版本。仅供参考。

\documentclass[border=10pt]{standalone}

\usepackage{tikz}
\usetikzlibrary{decorations.markings,arrows}
\begin{document}

    \begin{tikzpicture}
    \coordinate (A) at (4,2);
    \coordinate (B) at (1,2);   
    \coordinate (C) at (3,4);

    \draw [latex-latex, red, thick] (A) -- (B) -- (C);

    \draw [fill=blue] (A) circle (2pt) node [right=5pt] {$ A_2 $};
    \draw [fill=blue] (B) circle (2pt);
    \draw [fill=blue] (C) circle (2pt) node [right=5pt] {$ A_1 $};  


    \draw[postaction={%
                decorate,
                decoration={%
                    markings,
                    mark=at position 0.25 with {%
                        \arrow[line width=1.5pt]{>}
        }}}] (C) -- (A);

    \end{tikzpicture}

\end{document}

在此处输入图片描述

答案2

我以前没有见过这个问题...现在,差不多七年过去了,只是为了展示绘制这些向量的另一种方法(用于练习):

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows.meta, 
                decorations.markings}

\begin{document}
\begin{center}
    \begin{tikzpicture}[
dot/.style = {circle, draw, fill=blue!30, inner sep=2pt, 
              node contents={}},
decoration = {markings,
              mark=at position 0.5 with {\arrow{Straight Barb[length=3pt, line width=1.2pt]}}},
                        ]
\coordinate (A);
\coordinate[label=right:$A_1$] (A1)  at (2,4);
\coordinate[label=right:$A_2$] (A2)  at (3,0);
%
\path       (A) node[dot]  (A1) node[dot] (A2) node[dot];
\draw[-Stealth, red, very thick] (A) edge (A1)   to  (A2);
\draw[postaction={decorate}]  (A1) -- (A2);
    \end{tikzpicture}
\end{center}
We can define the positive combination of $A_1$ and $A_2$ to be the vectors lying in the cone between them. The line that crosses $A_1$ and $A_2$ (their heads) is the affine combination of them (one of the points plays the role of the origin of the axis).

\end{document}

在此处输入图片描述

相关内容