latex - Incorrect alignment of nodes in subpictures -


I am using ticks to type a diagram in the latex document.

I have a grid of 'grid-diagram' in which each grid-diagram has been prepared as a separate tux figure and then arranged in the form of nodes in the grid.

I have the circle node (which will eventually be a label) in the lower-right square of each grid-diagram.

I use the exact same code for every grid-diagram, but the circle is drawn separately in each case.

Am I doing something wrong or is this a bug in the tuck? In particular, is my view of involving sub-pictures / standard / good practice?

Look for an image.

  \ documentclass {article} \ usepackage {tikz} \ Usetikzlibrary {arrow, positioning} \ usepackage {verbatim} \ usepackage [active, tightpage] {preview} \ Preview Environment {tikzpicture} \ setlength \ Preview Border {5pt}% \ start {document} \ begin {tikzpicture} [scale = 1, node distance = .5 cm] \ node (a) at (0,0) {\ begin {tikzpicture} \ draw [step = .5 cm, brown, very thin] (-0.1, -1.6) grid (1.6, 0.1); \ Node at (1.25, -1.25) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ Node [right = a] (b) {\ begin {tikzpicture} \ draw [step = .5cm, gray, very thin] grid (-0.1, -1.6) (1.6, 0.1); \ Node at (1.25, -1.25) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ Node [a = below] (c) {\ begin {tikzpicture} \ draw [step = .5cm, brown, very thin] grid (-0.1, -1.6) (1.6, 0.1); \ Node at (1.25, -1.25) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ Node [right = of b] (d) {\ begin {tikzpicture} \ draw [step = .5cm, gray, very thin] grid (-0.1, -1.6) (1.6, 0.1); \ Node at (1.2, -1.5) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ Node [below = of b] (e) {\ begin {tikzpicture} \ draw [step = .5cm, gray, very thin] grid (-0.1, -1.6) (1.6, 0.1); \ Node at (1.25, -1.25) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ Node [below = c] (f) {\ begin {tikzpicture} \ draw [step = .5cm, gray, very thin] (-0.1, -1.6) grid (1.6, 0.1); \ Node at (1.25, -1.25) [fill = white, shape = circle, draw = black] {}; \ End {tikzpicture}}; \ End {tikzpicture} \ end {document}  

I'm not sure why the circle Your examples are not alliances, but it can be used by using the of with relative positioning.

I do not know that this is a best practice, but you can use it to automate the grid construction foreach :

  {-0.01cm, 2.99cm, 5.99 in \ foreach \ y {-0.01cm, 2.99cm, 5.99cm) in \ begin {document} \ start {tikzpicture} [scale = 1] \ foreach \ x Cm} {\ drag [step = .5 cm, brown, thin] (\ x, \ y) grid + (1.52 cm, 1.52 cm); \ Draw [fill = white, draw = black] (\ x, \ y) + (1.255 cm, 0.25 cm) circle (0.2cm); } \ End {tikzpicture} \ end {document}  

alt text


Comments