# The right way to use tikz in a table?

I am making a table where I want simple tikz line drawings in the cells. This is my first attempt to use tikz so I am likely to have made all sorts of mistakes. This is my attempt:

\documentclass[]{article}
\usepackage{tikz}

\begin{document}
\begin{table}[]
\centering
\begin{tabular}{c|c|c}
Apple & Apple & Apple\\
\hline
\begin{tikzpicture}
\coordinate node[circle,fill,inner sep=1pt,label=] (A) at (0,0);
\coordinate node[circle,fill,inner sep=1pt,label=] (B) at (1,1);
\draw (A) -- (B);
\end{tikzpicture}&    \begin{tikzpicture}
\coordinate node[circle,fill,inner sep=1pt,label=] (A) at (1,0);
\coordinate node[circle,fill,inner sep=1pt,label=] (B) at (0,1);
\draw (A) -- (B);
\end{tikzpicture}   &   \begin{tikzpicture}
\coordinate node[circle,fill,inner sep=1pt,label=] (A) at (0,0);
\coordinate node[circle,fill,inner sep=1pt,label=] (B) at (1,1);
\coordinate node[circle,fill,inner sep=1pt,label=] (C) at (2,1);
\draw (A) -- (B) -- (C);
\end{tikzpicture}
\end{tabular}
\caption{Caption}
\end{table}
\end{document}


It does in fact works however:

• It gives me an error message "Package tikz Error: A node must have a (possibly empty) label text". How should I fix that?
• It seems very wordy for such a simple task. Do I really need a separate tikzpicture environment for each cell for example?
• Yes, because of \coordinate node..... – user121799 Mar 12 '19 at 17:17

If you use nodes, you need to give them some content, even a {} is allowed. But you do not really need to use nodes to fill some circles. And yes, you need to start a tikzpicture whenever you want to have one, or you could use the shorthand \tikz{...}.

\documentclass[]{article}
\usepackage{tikz}

\begin{document}

\begin{table}[]
\centering
\begin{tabular}{c|c|c}
Apple & Apple & Apple\\
\hline
\path (0,1.2);}
&
\path (0,1.2);}
&