Quantcast
Channel: Draw a line that encloses some objects in TikZ - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 2

Draw a line that encloses some objects in TikZ

0
0

Given an array of circles, I want to draw a line that tightly encloses the circles. Since a picture is worth a thousand words:

enter image description here

The code to produce the array of circles is as follows:

\documentclass[border=4pt]{standalone}
\usepackage[dvipsnames]{xcolor}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
  [every node/.style={draw=LimeGreen, fill=LimeGreen!15,
    circle, inner sep=.1111em, minimum size=1.2222em},
   thick]

  \node [] (01) at (0,0) {1};
  \node [left] (02) at (01.west) {};
  \node [left] (03) at (02.west) {};
  \node [left] (04) at (03.west) {};

  \node [above] (05) at (01.north) {};
  \node [above] (06) at (02.north) {};
  \node [above] (07) at (03.north) {3};
  \node [above] (08) at (04.north) {};

  \node [below] (09) at (01.south) {};
  \node [below] (10) at (02.south) {};
  \node [below] (11) at (03.south) {};
  \node [below] (12) at (04.south) {};
\end{tikzpicture}
\end{document}

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images