我正在尝试使用 Tikz。不幸的是,当我使用负坐标时似乎出了问题:代码的最后一行
\begin{tikzpicture}[scale=2]
\draw [->] (-1,0) -- (3.2,0);
\draw [->] (0,-1.125) -- (0,3.2);
\draw (-0.75 : -0.5)--(1.5,2.25);
\end{tikzpicture}
绘制一条从 (-0.75,0) 开始的线,而不是从 (-0,75,-0.5) 开始的线。这是怎么回事?
答案1
尝试这个
\begin{tikzpicture}[scale=2]
\draw [->] (-1,0) -- (3.2,0);
\draw [->] (0,-1.125) -- (0,3.2);
%\draw (-0.75 : -0.5)--(1.5,2.25); % `:' gives you polar coordinate, but
% you are looking for canva coordinate
% (Cartesian coordinate), so you need
% `,' in the place of `:'.
\draw (-0.75 , -0.5)--(1.5,2.25);
\end{tikzpicture}