Code: Select all
\fill[draw=black,color=lightgray] (1.5,4) rectangle (3.5,4.5);
What should I do?
Code: Select all
\fill[draw=black,color=lightgray] (1.5,4) rectangle (3.5,4.5);
NEW: TikZ book now 40% off at Amazon.com for a short time.
Read the pgf/tikZ user guide, which suggests another approach.psionman wrote:[…] What should I do?
Code: Select all
\filldraw[draw=black,fill=lightgray] (1.5,4) rectangle (3.5,4.5);
Code: Select all
\documentclass[11pt]{article}\usepackage{tikz}\begin{document}\begin{figure}[!ht]\begin {center}\begin{tikzpicture}\filldraw[draw=black,color=lightgray] (1,1) rectangle (3,3);\end{tikzpicture}\end{center}\end{figure}\end{document}
Code: Select all
\filldraw[draw=black,fill=lightgray] (1.5,4) rectangle (3.5,4.5);
center
environment here due to unwanted vertical space. Simply replace by the \centering
command.NEW: TikZ book now 40% off at Amazon.com for a short time.