Take the 2-minute tour ×
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.

I want to put this node on an ellipse at about the 35% mark

\node[draw, circle, inner sep = .08cm, scale = .75] (location) {2};

\documentclass{article}
\begin{document}
\usepackage{tikz}
\usetikzlibrary{arrows, decorations.markings, decorations.pathreplacing}
\begin{tikzpicture}
\begin{scope}[decoration = {markings, mark = at position 0.3 with {\arrow{>}},} ]
  \clip (-5,0) rectangle (1,2.5);
  \draw[postaction = decorate] (-2,0) ellipse (3cm and 2cm);
\end{scope}
\end{tikzpicture}
\end{document}

How could I achieve this?

share|improve this question
    
@PeterGrill I mean path length –  dustin Mar 29 '13 at 22:30
    
@PeterGrill there isn't a way to do this in tikz without doing the math? Like I have done with the arrow placement? –  dustin Mar 29 '13 at 22:34
add comment

1 Answer

up vote 8 down vote accepted

You can use the markings library that you used for placing the arrow to also place the node:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{arrows, decorations.markings, decorations.pathreplacing}

\begin{document}
\begin{tikzpicture}
\begin{scope}[
    decoration = {
        markings,
        mark = at position 0.3 with {\arrow{>}},
        mark = at position 0.3 with {\node[draw, circle, inner sep = .08cm, scale = .75] (location) {2};}
    } ]
  \clip (-5,0) rectangle (1,2.5);
  \draw[postaction = decorate] (-2,0) ellipse (3cm and 2cm);
\end{scope}
\end{tikzpicture}
\end{document}
share|improve this answer
2  
Maybe also mentioning to use an ellipse shaped node referral with an angle anchor would be useful. Oh wait I just did :P –  percusse Mar 29 '13 at 23:04
add comment

Your Answer

 
discard

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.