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?

0

1 Answer 1

4

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}
1
  • Thanks! That was embarassing :) May 8, 2019 at 8:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .