0

I am trying to use Tikz. Unfortunately, something seems to go wrong when I use negative coordinates: the last line of the code

\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}

draws a line starting from (-0.75,0), not from (-0,75,-0.5). What gives?

2

Try this

\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}
  • Thanks! That was embarassing :) – H A Helfgott May 8 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.