TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that the TikZ Arrow Tip Library (arrows) defines a circle arrow [-o], however this circle is too large for me. Is there any way I can control the size of the circle on the end of line?

share|improve this question
I am interested at a solution too. What I do at this point is to define a circular node manually: \begin{tikzpicture} \def\radius{2pt} \draw (0,0) -- (1,0) node [circle,radius=\radius,draw,fill=white,inner sep=\radius] {}; \end{tikzpicture} – hpesoj626 Oct 26 '12 at 14:48
@Pygmalion Do you had checked the pgflibraryarrows.code.tex? If you change there the line \pgfpathcircle{\pgfqpoint{4.5\pgfutil@tempdima}{0bp}}{4.5\pgfutil@tempdima} by other with a value less than 4.5 you will obtain what you want. – rafaeldf Oct 26 '12 at 15:24
@rafaeldf I was thinking of that too, but I do not know where to find tikz codes. – Pygmalion Oct 26 '12 at 16:15
@Pygmalion Try look at ...\tex\generic\pgf\libraries inside the folder that you had selected for installation (e.g., C:\Program Files\...). – rafaeldf Oct 26 '12 at 16:29
it would be great to see a solution using \tikzset{o=<options go here>}, similar to how one can change the arrows easily using \tikzset{>=stealth} for example – cmhughes Oct 26 '12 at 19:26
up vote 12 down vote accepted

You can use the decorations.markings library to define a style (say, o) that takes an optional argument for changing the size:


        shorten >=#1,
                at position 1
                with {
                    \draw circle [radius=#1];
\draw [o] (0,1) -- (4,3);
\draw [o=1pt] (1,1) -- (4,2);
share|improve this answer
This is not exaclty the same as [-o]. In [-o] circle touches the end of the path, while [o] draws circle on the end of the path... I know that I have to add 2* befor #1 on line 3 of the definition, but I do not know how to calculate new position... – Pygmalion Oct 29 '12 at 19:07
You can use shorten >=2*#1 together with \draw circle [xshift=-#1,radius=#1];. The local coordinate system is rotated, so that xshift moves the mark in the direction of the line. – Jake Oct 29 '12 at 19:31
Thanks! That's it. – Pygmalion Oct 29 '12 at 19:51
Hello Jake. I don't find how to get the circles at both tips of the line. Please could you help ? – Stéphane Laurent Feb 10 at 14:33
Sorry I get it now. Just add a new mark with position=0. Thanks! – Stéphane Laurent Feb 10 at 14:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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