TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

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

This question is slightly different from Drawing on an image with TikZ.

What I'm asking is how can I put a vertex label, at a particular point (x,y), on an image of a graph in TikZ?

    \node[anchor=south west,inner sep=0 <--What is this?] at (0,0) {\includegraphics[scale=.5]{graph.png}};
share|improve this question
I assume you mean Drawing on an image with TikZ‌​? The approach there can be used to place arbitrary objects on an image, not only for red rectangles on mushrooms. – Jake Aug 2 '13 at 19:56
Yes, but I don't know how to draw a label. – Trancot Aug 2 '13 at 19:57
Is it just a node? – Trancot Aug 2 '13 at 19:58
I think I figured it out: \node[shift={(1.0,0.3)}]{$v_1$}; – Trancot Aug 2 '13 at 20:09

You can place anything using this approach, not just rectangles.

To place text, you have to use \node at (<coordinates>) {<text>};:


    \node[anchor=south west,inner sep=0] (image) at (0,0) {\includegraphics[width=0.9\textwidth]{mushrooms.jpg}};
        x={(image.south east)},
        y={(image.north west)}
        \node [white, font=\bfseries] at (0.25,0.65) {$P(X|Y)$};

share|improve this answer

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.