3

This question already has an answer here:

I want to create a 3D-grid of named nodes using nested for loops and then fill some polygon based on the names. For some reason tikzpicture doesn't fill the polygon, although it draws the path alright.

I assume it has something to do with the node names. Here is a minimal 2D-example:

\begin{tikzpicture}

\foreach \i in {0,...,3} {
  \foreach \j in {0,...,3} {
     \node at (\i, \j) (\i\j) {};
}}

\draw (00) -- (02) -- (12);
\fill (00) -- (02) -- (12);

\end{tikzpicture}

The output is the grid, with two lines but no fill.

marked as duplicate by yo', Torbjørn T., egreg, lockstep, Mensch May 28 '13 at 10:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    See if TikZ doesn't fill when node coordinates are used solves your problem. – Torbjørn T. May 28 '13 at 9:47
  • Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – Peter Jansson May 28 '13 at 10:03
  • How to upvote Torbjorns comment? – Leevi L May 28 '13 at 10:20
  • 2
    When you place your mouse cursor over a comment, an arrow should appear on the left side (unless there's a reputation limit, but I don't know if that's the case). Comment votes doesn't give any rep. But anyways, when a new question is a duplicate of an old one, we usually close the new question. That doesn't mean it's a bad question, it's just to keep things 'tidy'. – Torbjørn T. May 28 '13 at 10:37
  • 1
    @jake no but I just found out that I did't have enough reputation (for a table of privileges see tex.stackexchange.com/faq#reputation) with your comment I got the extra 1 rep I needed to vote up the comment =D – Leevi L May 28 '13 at 14:15