如何修复垂直坐标系?

如何修复垂直坐标系?

我正在尝试绘制垂直坐标,但是它绘制的距离比想象的要远一些。

在此处输入图片描述

这是代码:

\begin{tikzpicture}[auto, node distance=3cm,>=latex', scale=0.6 ,every
            node/.style={transform shape}]
                % Draw axes
                \draw[->] (xyz cs:x=-5) -- (xyz cs:x=5) node (alpha_coord) [above]
                {$\alpha$}; \draw[->] (xyz cs:y=-5) -- (xyz cs:y=5) node (beta_coord)
                [right] {$\beta$};


                \draw[draw=red!60, ->] (0, 0) -- (0:3)  node (beta_f)
                [above, red]{$\beta_1$}; 
                \draw[draw=red!60, ->] (0, 0) -- (120:3)    node
                (beta_s) [above, red]{$\beta_2$}; 
                \draw[draw=red!60, ->] (0, 0) -- (240:3)    node (beta_t)
                [left, red]{$\beta_3$};

                \draw[dashed, draw=red!60] (beta_coord |- 120:3)  -| (120:3 |-
                alpha_coord);

                \draw[dashed, draw=red!60] (beta_coord |- 240:3)  -| (240:3 |-
                alpha_coord);

                \draw[->, draw=blue!60] (0.5,0) arc (0:120:0.5) node[midway,
                right=3pt, blue]{$120^{\circ}$};
                \draw[->, draw=blue!60] (120:0.5) arc (120:240:0.5) node[near start,
                left, blue]{$240^{\circ}$};


            \end{tikzpicture}

答案1

因为right选项用锚点锚定节点west。所以你可以通过以下方式引用它的水平位置.west

%in the preamble    \usetikzlibrary{arrows}
\begin{tikzpicture}[auto, node distance=3cm,>=latex', scale=0.6 ,every node/.style={transform shape}]
\draw[->] (-5,0) -- (5,0) node[above] (alpha_coord) {$\alpha$}; 
\draw[->] (0,-5) -- (0,5) node[right]  (beta_coord)  {$\beta$} ;


\draw[draw=red!60, ->] (0, 0) -- (0:3)  node (beta_f)[above, red]{$\beta_1$}; 
\draw[draw=red!60, ->] (0, 0) -- (120:3)node (beta_s)[above, red]{$\beta_2$}; 
\draw[draw=red!60, ->] (0, 0) -- (240:3)node (beta_t)[left,   red]{$\beta_3$};

\draw[dashed, draw=red!60] (beta_coord.west |- 120:3)  -| (120:3 |-alpha_coord);
\draw[dashed, draw=red!60] (beta_coord.west |- 240:3)  -| (240:3 |-alpha_coord);

\draw[->, draw=blue!60] (0.5,0) arc (0:120:0.5) node[midway,right=3pt, blue]{$120^{\circ}$};
\draw[->, draw=blue!60] (120:0.5) arc (120:240:0.5) node[near start,left,blue]{$240^{\circ}$};
\end{tikzpicture}

在此处输入图片描述

相关内容