3

I'm a litte confused, because I drew a TikZ-picture and didn't get what I expected. Have look at the following:

\documentclass[12pt,a4paper]{article}
\usepackage{amsmath, amssymb, ngerman}
\usepackage[latin1]{inputenc}

\begin{document}
\usepackage{pgf,tikz}
\usetikzlibrary{arrows}
\begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=0.8cm,y=0.8cm]
\draw[->,color=black] (-3.17,0) -- (5.5,0);
\foreach \x in {-3,-2,-1,1,2,3,4,5}
\draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$};
\draw[->,color=black] (0,-3.22) -- (0,7.5); \foreach \y in {-3,-2,-1,1,2,3,4,5,6,7}
\draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$};
\draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$};
\clip(-3.17,-3.22) rectangle (5.35,7.26);
\draw (0,0) rectangle (1,1);
\draw (-1,0) rectangle (0,1);
\draw (0,-1) rectangle (1,-2);
\draw (3,0) rectangle (4,1);
\draw (0,4) rectangle (1,5);
\draw[->] (1,1) edge [bend right] node[above right] {$d_{A,P_1}$} (-1,1);
\draw[->] (-1,0) edge [bend right] node[left] {$d_{A,P_2}$} (0,-2);
\draw[->] (1,-2) edge [bend right] node[below right] {$d_{A,P_3}$} (4,0);
\draw[->] (4,1) edge [bend right] node[above right] {$d_{A,P_4}$} (1,5);
\end{tikzpicture}

\end{document}

I drew some bended edges, but the little arrows showing up at the starting point of my edge are not intended. I have no idea how to fix it but it has something to do with "edge".

Perhaps someone can help me out? Thanks in advance.

5
  • Can you tell me the coordinates at which you do not wish to have the arrows? – subham soni May 21 '14 at 9:22
  • Yes: (1,1), (-1,0),(1,-2),(4.1), the starting points of my edges – ulead86 May 21 '14 at 9:23
  • I found it: just replace "edge" by "to". I don't know why, but it worked – ulead86 May 21 '14 at 9:47
  • tex.stackexchange.com/questions/82326/… has some explanation of why this occurs. If you agree we can close as duplicate. Note that, as percusse mentions in his answer to the above question, you could also move the arrow specification to the edge itself, i.e. \draw (0,0) edge[->] ... – Torbjørn T. May 21 '14 at 17:03
  • 1
    You're allowed to close as duplicated – ulead86 May 22 '14 at 8:24

Browse other questions tagged or ask your own question.