I have a question concerning drawing something similar to a smart art feature. If I have a diagram like so:
The first thing I can do is draw the individual panels:
\documentclass{standalone}
\usepackage[margin = 1in]{geometry}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing,calc,shapes,arrows,snakes,shapes.geometric,patterns}
\usepackage{amsmath}
\usepackage{graphicx}
\begin{document}
\begin{tikzpicture}[y = 13mm, x = 10mm,decoration = snake] % used for aspect ratio of diagram
\tikzstyle{every node}=[font=\scriptsize] % ensure all text is relatively small
\coordinate (clipping area) at (10, 5.9);% The figure is drawn a bit bigger, and then clipped:
\clip (0,0) rectangle (clipping area);
% Next reference points are relative to the lower left corner of the clipping area
\coordinate (water level) at (0, 6);
\coordinate (bottom) at (5, 1); % (bottom of the pit)
\coordinate (ground1) at (0, 6); % (left shore)
\coordinate (ground2) at (10, 6); % (right shore)
\coordinate (sedFlux) at (5, 2.2); % location where we need the sediment flux arrow
% Coordinates of the bigger area really drawn
\coordinate (lower left) at ([xshift=-5mm, yshift=-5mm] 0,0);
\coordinate (upper right) at ([xshift=5mm, yshift=5mm] clipping area);
% Draw the water and ripples
\draw [draw=blue!80!black, decoration={bumps, mirror, segment length=6mm}, decorate,
bottom color=cyan!60!black, top color=blue!20!white]
(lower left) rectangle (water level-|upper right);
% Draw the ground
\draw [draw=white, fill=white]
(lower left) -- (lower left|-ground1) --
(ground1) .. controls ($(ground1)!.3!(bottom)$) and (bottom-|ground1) ..
(bottom) .. controls (bottom-|ground2) and ($(ground2)!.3!(bottom)$) ..
(ground2) -- (ground2-|upper right) -- (lower left-|upper right) -- cycle;
\end{tikzpicture}
\end{document}
Is it then possible to use this diagram and others to draw something like a smart diagram where instead of having text you could gave separate diagrams? I would eventually like to end up with something like:
But obviously each of the panels will not be identical. Assuming that the panels are identical can anyone suggest a way of doing this?
\matrix
where you can place arbitrary TikZ code in the cells. For a smarter layout, take a look at thesmartdiagram
package. If you always use the same picture it would be best to store it in a box (look up\sbox
and\usebox
) and then you can use it in the nodes. (Nesting TikZ pictures can be a nasty business.)