1

When I run the LaTeX code below, I get the error

Package pgf Error: No shape named h02 is known

Meanwhile, I have tagged the \node object with the label h\x0 in the for loop. Which seems to me the right thing that should be done. I even uncommented the line with the \coordinate command and changed h02.west to v02.west but still I get the error

Package pgf Error: No shape named v02 is known

Here is my code:

\documentclass[10pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[place/.style={rectangle,draw=blue,inner sep=0pt,minimum size=5mm},scale = 1.6,every lower node part/.style={font=\tiny}]

% Horizontal Vertices
\foreach \x in {0,1,2}
{
    \draw (\x,0) circle (0.03cm);
    \fill (\x,0) circle (0.03cm);
    \node (h\x0) at (\x,0) [place] {};
    % \coordinate (v\x0) at (\x,0);
}
\node [left, every lower node part] at (h02.west) {$N_{1}=3$};
\end{tikzpicture}
\end{document}
1
  • Hi evansdoe! I suppose you mean (h0\x) rather than (h\x0). Feb 16, 2015 at 11:58

1 Answer 1

1

I have seen the error. The name tag (h02.west) should rather be (h20.west).

\documentclass[10pt,a4paper]{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[place/.style={rectangle,draw=blue,inner sep=0pt,minimum size=5mm},scale = 1.6,every lower node part/.style={font=\tiny}]

% Horizontal Vertices
\foreach \x in {0,1,2}
{
    \draw (\x,0) circle (0.03cm);
    \fill (\x,0) circle (0.03cm);
    \node (h\x0) at (\x,0) [place] {};
    % \coordinate (v\x0) at (\x,0);
}
\node [left, every lower node part] at (h20.west) {$N_{1}=3$};
\end{tikzpicture}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .